// Create a zip file stream FileStream outputStream = new FileStream("SaveHtmlWithCellAttributes.zip", FileMode.Create); //create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); Stream fileStream = this.GetResourceStream("xlsx\\NetProfit.xlsx"); workbook.Open(fileStream); HtmlSaveOptions options = new HtmlSaveOptions(); // Use CellAttributeOptions to add the cell element's address attribute to the exported html file options.CellAttributeOptions.Add(CellAttribute.Address, "address"); workbook.Save(outputStream, options); // Close the zip stream outputStream.Close();
' Create a zip file stream Dim outputStream = File.Create("SaveHtmlWithCellAttributes.zip") ' Create a new Workbook Dim workbook As New Workbook Dim fileStream As Stream = Me.GetResourceStream("xlsx\NetProfit.xlsx") workbook.Open(fileStream) Dim options As New HtmlSaveOptions() ' Use CellAttributeOptions to add the cell element's address attribute to the exported html file options.CellAttributeOptions.Add(CellAttribute.Address, "address") workbook.Save(outputStream, options) ' close the zip stream outputStream.Close()