473,396 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Excelworkbook SaveAs method not working.

Hi,

I an new to this forum, I trying to open an excel workbook update it with some details\data and the save it using excelWorkbook.SaveAs method but the exceution freezes at the SaveAs method with no exceptions at all.I am using version 11.0.0.0 of Microsoft.Office.Interop.Excel. PFB the piece of code for the same -

Expand|Select|Wrap|Line Numbers
  1. excelWorkbook.SaveAs(System.AppDomain.CurrentDomain.BaseDirectory + PCRFTempFolderKey + savedFileName, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal, null,null, false, false,Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,false, false, null, null, null);
  2.  
However if I take the file format as xlXMLSpreadsheet it works fine but then again there are certain images in my excel workbook which are not getting saved and also when the the saved excel is opened its shows an alert box saying that the format is different from what defined by the extension of the file.

Also the same thing works fine if I use Version 12.0.0.0 of Miicrosoft.Office.Interop.Excel ( but I am supposed to use 11.0.0.0 only for xls files). I am not sure about the issue at all, please help me out if anyone has any solution for this.
May 23 '10 #1
1 2333
Someone please pick this thread and help me out.
May 25 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeff | last post by:
I am using the HttpPostedFile to allow users to upload files to a server farm. The SaveAs() saves to a shared network path (\\SERVER\SHARE) so that no matter which web server is taking the...
8
by: Al Smith | last post by:
Hi, I am able to use the HttpPostedFile.SaveAs() method to upload and save a file to the local web machine. However, I would really like to save the file to a VirtualDirectory. Does anyone...
0
by: rao | last post by:
I am trying to get sub nodes for for clicked node using getChildren() method as shown below. I am getting javascript exception error (subtree.null )when nodes are not expanded. The code works only...
5
by: Reddy | last post by:
System.Web.UI.HtmlControls.HtmlInputFile.SaveAs(FileName) is not overwriting the file. It used to work fine on IIS5.1 Recently we migrated to IIS6.0. Since then it's not working. If it's new file...
5
by: Dylan Parry | last post by:
Hi, I'm trying to upload some files via a form, and I have managed so far to save the files on the server in a temporary directory using: HttpPostedFile.SaveAs(string filename); This is a...
10
by: Hendri Adriaens | last post by:
Hi, I'm trying to automate the creation of an excel file via COM. I copied my code below. I read many articles about how to release the COM objects that I create. The code below runs just fine...
1
by: byrdman | last post by:
When I upload a image file to a folder on a my server in Fire Fox i get a request for username and password dialog box. If I cancel the dialog box for Fire Fox I get a permission denied error. The...
0
by: KUVU | last post by:
I am automating an excel report using C#.net.For this i am using a template (.xlt) my code is exceuting perfectly on localcomputer but when i tried on server(windows server 2003) it is not exceuting...
3
by: Chris | last post by:
I'm trying to create an excel file which will act as a log, however I want to overwrite the file if it exists. Looking at the SaveAs method I can't find anything that would allow it. I don't...
0
by: serhio | last post by:
Hello, I have a problem with Microsoft.Office.Interop.Excel.Range.Group() method. The problem is that I can call this method only 7 times, before it throws me an exception. I don't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.