hello,
sorry for my bad english.
i am trying to write to an existing excel file (.xls format).
this existing excel file has a macro in it.
the problem is when i try to save it (using Workbook.Save(targetfile)), it can be saved successfully but all the macros are gone.
here are my snippet codes :
Workbook ExistingWorkbook = new Infragistics.Documents.Excel.Workbook(WorkbookFormat.Excel2007MacroEnabled); ExistingWorkbook = Workbook.Load(workbookPath2); //workbookPath2 is a .xls file foreach (Worksheet sheet in ExistingWorkbook.Worksheets) { if (sheet.Name.Equals(currentSheet2)) { for (int i = 1; i <= 204; i++) { if (i <= 55) { int x = i + 17; WorksheetRow row = sheet.Rows[x]; row.Cells[4].Value = excel_temp[i.ToString()].ToString(); }
....
ExistingWorkbook.Save(workbookPath2);
Any replies are really appreciated.
Thank you.
Which version are you using? There is support to round-trip VBA code, but currently, forms which use them are not preserved.
hi,
currently using Infragistics4.WebUI.Documents.Excel.v12.1.dll
this is a trial version.
please update us when this features are available.
until then we will stay on trial version.
thanks for your replies and attention.
So just to make sure I understand: you would like the forms to be preserved. Is that correct? If so, I will have Developer Support create a feature request on your behalf.
yes please.
the macros are as important as the file itself.
your actions are really appreciated.
Ok, I have asked DS to create a feature request on your behalf.
Hello,
I have had Product Idea PI12100056 created for round-trip support for Excel forms. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.