L
Lochlan Berg
Guest
using System;
using System.IO;
using System.Runtime.InteropServices;
using Excel = Microsoft.Office.Interop.Excel;
namespace openingworkbook
{
class Program
{
static void Main(string[] args)
{
var exApp = new Microsoft.Office.Interop.Excel.Application();
var exWbk = exApp.Workbooks.Open(@"C:\Temp\ExcelTest\lineup.xlsx");
exApp.Visible = true;
exApp.Run("C:\Temp\ExcelTest\lineup.xlsx!lineup");
exWbk.Save();
exApp.Workbooks.Close();
exApp.Quit();
exWbk.Close();
}
}
}
So I am trying to open an already existing .xlsx file and run a macro inside of excel then save and quit. The error code is CS1009 and the description is Unrecognized escape sequence. I've look around on the internet for a solution but am struggling to find up to date code that works. Not asking for a complete solution but guidance will be appreciated.
Continue reading...
using System.IO;
using System.Runtime.InteropServices;
using Excel = Microsoft.Office.Interop.Excel;
namespace openingworkbook
{
class Program
{
static void Main(string[] args)
{
var exApp = new Microsoft.Office.Interop.Excel.Application();
var exWbk = exApp.Workbooks.Open(@"C:\Temp\ExcelTest\lineup.xlsx");
exApp.Visible = true;
exApp.Run("C:\Temp\ExcelTest\lineup.xlsx!lineup");
exWbk.Save();
exApp.Workbooks.Close();
exApp.Quit();
exWbk.Close();
}
}
}
So I am trying to open an already existing .xlsx file and run a macro inside of excel then save and quit. The error code is CS1009 and the description is Unrecognized escape sequence. I've look around on the internet for a solution but am struggling to find up to date code that works. Not asking for a complete solution but guidance will be appreciated.
Continue reading...