that helped, but I’m still getting an extra blank page in my word document. Can I do something about that ?
You may set the printable area for the worksheet in MS Excel manually and then take the print preview of the sheet in MS Excel to check that blank page is also displayed or not. Moreover, could you please share your sample (runnable) code using Aspose.Cells for .NET with resource files (please zip the files prior attaching here). We will check and assist you to accomplish the task for your requirements.
code-
Hi, this is the code I am using. For some reason other tables and charts are also showing up in the created document.
Workbook workbook = new Workbook(“C:\my\path\Adhirath Excel Doc.xlsx”);
Aspose.Cells.Range range = workbook.Worksheets.Names[RangeName].GetRange();
range.Worksheet.IsVisible = true;
foreach (Worksheet sheet in workbook.Worksheets)
{
if(sheet.Index != range.Worksheet.Index)
{
sheet.IsVisible = false;
}
}
Aspose.Cells.PageSetup pageSetup = range.Worksheet.PageSetup;
pageSetup.PrintArea = range.RefersTo;
DocxSaveOptions saveOptions = new DocxSaveOptions();
workbook.Save(“C:\my\path\Adhirath Excel Doc.Docx”, saveOptions);
I am trying to get only the range called foramttedTable, it ends up providing me an extra blank page when converted to doc.
Adhirath Excel Doc.zip (26.1 KB)
@Adhirath
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-57903
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hi, so there is a range I manually created, it has borders and when i save the excel as docx, i am not getting those borders to show up. The print image look just fine when I open it in excel. what is the reason?
try 1 is the output, book1 is the source table
Book1.zip (11.9 KB)
Try1.zip (8.9 KB)
also recommend fixes so that I am able to replicate the table exactly the way it is in excel print page to my word document. Thanks!
@Adhirath
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSNET-57925
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@Adhirath
We are pleased to inform you that your issue (logged earlier as “CELLSNET-57903”) has been resolved. The fix/enhancement will be included in the next release (Aspose.Cells v25.3) scheduled for release first half of March (next month). You will be notified when the next version is published.
This is to inform you that your issue (logged earlier as “CELLSNET-57925” - Show Borders when converting Excel to DOCX) has been resolved. The fix/enhancement will be included in the next release (Aspose.Cells v25.3) scheduled for release first half of March (next month). You will be notified when the next version is published.
Thank you guys, amazing support !!
You’re welcome! Stay tuned—the next version is scheduled for release in the second week of March 2025.
looks great!
Thanks for your feedback.
We will keep you updated as soon as the new version is released.
Hi guys, ran into another issue, when i am trying to add a currency to my range instead of showing the currency i am getting another symbol, is there a fix for it?
my input range-
image.png (1.1 KB)
my output-
image.png (1.2 KB)
@Adhirath
dest.docx (9.4 KB) is generated by 25.2.
We can not reproduce your issue with the following codes:
Workbook workbook = new Workbook(dir + "Excel doc (1).xlsx");
workbook.Save(dir + "dest.docx");
probably because of the older version. Another query, when i get a single celled value from a sheet, I want to not convert the entire excel to a word doc. I want to simply pass the value as a string but I want it to retain its type, so if its a currency type it should retain that , same for date and so on. Is that possible?
It should work as expected when you render Excel spreadsheet (with specific range of cells only in a worksheet) to DOCX file format. Do you find any issue? Please provide more details with sample files (input Excel file (if any), output DOCX file, etc.) and sample (runnable) code that you are using. We will check your issue soon. Also, tell us how do you determine cell (data) type in the output MS Word document page?