Taking a shot in the dark here...
I have a C# .NET Application that unzips a set of .txt files, converts them to .xlsx and uploads them to SharePoint. The application was running when a forced system update was pushed to my computer and the application no longer works. It appears my machine can no longer manipulate excel. We are using Microsoft.Office.Interop.Excel namespace.
Is there anything I can check on my machine itself that could be corrupt and not allow excel to be manipulated? The same code works on an identical machine and had been working for years.
I have reinstalled both the application and Microsoft Office. The error I am getting is below. I can provide additional information on any specific portion of the code but this seems to be a issue with my machine not the code.
System.IO.FileNotFoundException: Could not find file
'C:\Extracts\alwilliams3\Files\XLSX\TIMESHEET_EXTRACT(26_Jun_17-
1032AM).xlsx'.
File name: 'C:\Extracts\alwilliams3\Files\XLSX\TIMESHEET_EXTRACT(26_Jun_17-1032AM).xlsx'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Ionic.Zip.ZipFile.get_ReadStream()
at Ionic.Zip.ZipFile.ReadIntoInstance(ZipFile zf)
at Ionic.Zip.ZipFile.Read(String fileName, TextWriter statusMessageWriter, Encoding encoding, EventHandler`1 readProgress)
at CVS_DailyExtracts_To_Sharepoint.Utils.ExtractFiles(String fileName, String outputDirectory)
at CVS_DailyExtracts_To_Sharepoint.Form1.ProcessFilesToStagingFolder(UploadFileName b)
at CVS_DailyExtracts_To_Sharepoint.Form1.button3_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)