Is there a way to have grid lines in html when saving in that format?
I tried this code, but it doesn’t work:
foreach (Worksheet sheet in workbook.Worksheets)
{
sheet.IsGridlinesVisible = true;
}
var opt = new HtmlSaveOptions();
opt.SaveFormat = SaveFormat.Html;
workbook.Save(outfile, opt);
Hi,
I think, you should set the border of the cells and then save your workbook in html format.
Please see the following reference article:
Adding Borders to Cells
Hi,
I don’t have a sample. I was just evaluating your product, and I was asking myself if it is possible with your library. My need is to have a tool to convert an excel file to html in order to represent it in a browser “as is”, with grid lines and heading rows and columns.
Thank you very much for your very quick replies
thank you very much for your suggestion.
However this kind of solution is not so good for my situation. I have an
excel coming as input, and I have to display it as HTML in a browser in
a read only way, but represented as it was open in excel, with cell grids and
column and row headers.
With your suggetion I should make a copy of original sheet and transform it just to put borders where missing (I can’t place always a black border everywhere, because if the original sheet has some cells with border I have to respect this setting)
Hi,
I guess, Aspose.Cells for GridDesktop which is also a part of Aspose.Cells Family Product will better suit your requirements.
You will be able to open your Excel file using Aspose.Cells for GridDesktop with gridlines.
Please see
Working with GridWeb > Opening an MS Excel File