0
Reply

How can I save a selection part in an excel sheet as an HTML by Microsoft.Office.Interop.Excel?

loghman dastgheyb

loghman dastgheyb

Jul 30 2007 9:12 AM
1.8k
hi.
I use the com object that microsoft provided for the excel.
I use the "microsoft excel object library 12" for converting a sheet in excel to html.
I first declare an Excel.application and then open a file and after that I save it again by
SaveAs method into html. but I can't save a selection part!
I can select a part by region that is in that namespace provided.
one way that I use is: save the selected part into new sheet and save that sheet to html!
but in this case all fonts and their color and width of cells are not correct and I can't get
a proper result! I see when I use the excel itself. when I select a part and go to the SaveAs in the
save dialog that is apeared there is two radioBox that you can choose. save sheet and save selection.
this save selection is very nice! because all the properties off the selection part is protected
and the result is so interesting!
thank you for read my question.