Want to extract a table from excel using apsose cell and write it in aspose word

@Keerthana_K_R,

Could you please share your sample (runnable) code and template Excel file (please zip the file first) to show the issue, we will check it soon.

This behavior is same with MS Excel, you may check it in MS Excel manually. You may evaluate if a row is hidden via Row.IsHidden attribute (you may browse rows in a loop) and then remove each hidden hidden row in code before inserting or cut/copy paste the range.

Example File.zip (29.3 KB)
This is the document and I am trying to print it in html from A3 till M10 but see the second row first column its missing letter M and start printing from -100…
Let me add the screenshot of output aswell
image.png (8.9 KB)

Yes @amjad.sahi I am aware about this approach but wanted to check if there were some other ease approach. That’s fine already I am able to achieve with ishidden attribute Thanks for that😊

@Raghul214,

Thanks for the sample file and details.

After an initial test, I was able to reproduce the issue as you mentioned by using your template Excel file and following sample code. I found some letters (e.g., M in second row) are not visible even after using/calling Worksheet.AutoFitColumns when rendering to HTML.

using (var fstream = new FileStream("e:\\test2\\Example File.xlsm", FileMode.Open))
{
    // Instantiate a Workbook object that represents the existing Excel file
    var workbook = new Workbook(fstream);

    var sheet = workbook.Worksheets[0];

    workbook.Worksheets.ActiveSheetIndex = sheet.Index;

    var range = sheet.Cells.CreateRange("A3:M10");


    sheet.PageSetup.PrintArea = range.Address;

    sheet.AutoFitColumns();

    // Save the Excel file to HTML
    workbook.Save("e:\\test2\\out1.html", new HtmlSaveOptions
    {
        ExportImagesAsBase64 = true,
        ExportPrintAreaOnly = true,
        ExportHiddenWorksheet = false,
        ExportActiveWorksheetOnly = true
    });
}

We require thorough evaluation of the issue. 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-55838

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.

1 Like

It is nice to know that you have implemented it to accomplish the task.

Yes Thank you for that :blush:

@Keerthana_K_R
You are welcome. If you have any questions, please feel free to contact us.

@Raghul214

We are pleased to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v24.6) that we plan to release in the first half of June 2024. You will be notified when the next version is released.

Attached is the fixed result for your reference:
output.zip (3.7 KB)

Yes sure, @Eric.wang Thanks for the update :blush:

@Keerthana_K_R,

You are welcome. We will keep you posted with updates (once available).

The issues you have found earlier (filed as CELLSNET-55838) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi