How can I get the used size of a sheet in such a format : $A$1:$G$25?
I use:
xls.PublishObjects.Add(
Microsoft.Office.Interop.Excel.XlSourceType.xlSourceRange,
outputFile,
wsCurrent.Name,
"$A$1:$G$25",
Microsoft.Office.Interop.Excel.XlHtmlType.xlHtmlStatic,
"dsg",
"").Publish(true);
But I need to get the whole sheet, not only that $A$1:$G$25 range.
Are you trying to export the whole sheet as HTML? If so you can use the following code without needing to calculate the used range.
Otherwise you can use the following code: