Hello,
is there any way to open an existing Excel document that contains macros and control elements (such as buttons) and preserve them until the document is being saved again?
Dim wb As Infragistics.Excel.Workbook = Infragistics.Excel.Workbook.Load("MyExcel.xls")wb.Save("MyExcel2.xls")
=> All macros, buttons etc. lost in MyExcel2.xls.
Thanks
Max
Has this feature been implemented yet?
Hi
I am not even able to load the excel file having macros . I am using the below code :
Infragistics.Excel.Workbook.Load(curStream but getting Error :
Unable to read beyond the end of the stream.
at System.IO.__Error.EndOfFile() at System.IO.BinaryReader.ReadByte() at Infragistics.Excel.StructuredStorage.FileTypes.VariantUtilities.ReadString(BinaryReader reader, Encoding encoding) at Infragistics.Excel.StructuredStorage.FileTypes.VariantUtilities.ReadVariantType(BinaryReader reader, VariantType type, Encoding encoding) at Infragistics.Excel.StructuredStorage.FileTypes.DocumentSummaryInformation.ReadUserDefinedProperty(BinaryReader reader, PropertyDefinition definition) at Infragistics.Excel.StructuredStorage.FileTypes.DocumentSummaryInformation.ReadSectionProperties(BinaryReader reader, PropertySectionDefinition sectionDefintion) at Infragistics.Excel.StructuredStorage.FileTypes.InformationBase.ReadSection(BinaryReader reader, PropertySectionDefinition sectionDefintion) at Infragistics.Excel.StructuredStorage.FileTypes.InformationBase.Load(Stream stream) at Infragistics.Excel.DocumentProperties.Load(StructuredStorageManager manager) at Infragistics.Excel.Workbook.LoadBIFF8File(Workbook workbook, Stream stream, String parameterName) at Infragistics.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Excel.Workbook.Load(Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Excel.Workbook.Load(Stream stream) at Humana.Medicare.Mamba.Utility.ExportToExcel.GetExcelsheetNameList(Stream curStream, ImportType importType, Int32 templateColumnCount) at Humana.Medicare.Mamba.Web.ImportExport.UserControl.MambaExcelFileImport.ListWorksheetButton_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Can you help ?
Yamini,
I've just submitted feature request FR12066 for the functionality to round-trip the contents of forms (such as buttons and labels) when loading and subsequently saving an Excel file through our Excel engine to be added to a future version of the toolset.
For anyone else who is interested in seeing similar functionality in a future version of the NetAdvantage for .NET toolset, you can submit a feature request here. Remember, the number of requests we receive for a given feature is one of the tools we use to prioritize what functionaltiy goes in to a given release.
The macros are now round-tripped, but forms such as buttons and labels are not. I have forwarded this post to the Developer Support Manager to create a feature request on your behalf.
Hi,
I need to have buttons, labels in the excel file. Has this feature been implemented.
REgards,
Yamini