We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Does PasteOptions has the option of paste only visible cells?

Hi,
I am using aspose cells 8.1
I am copying range to new workbook for html output.

Workbook newWorkbook = new Workbook(FileFormatType.XLSX);
WorksheetCollection targetWsc = newWorkbook.getWorksheets();
com.aspose.cells.Worksheet targetWs = (com.aspose.cells.Worksheet)targetWsc.get(0);
Range targetRange = targetWs.getCells().createRange(0, 0, sourceRange.getRowCount(), sourceRange.getColumnCount());
PasteOptions options = new PasteOptions();
options.setPasteType(PasteType.ALL);
targetRange.copy(sourceRange, options);

return newWorkbook;

The above code copies hidden columns as hidden.
But hidden rows are copied as unhidden rows .
Is this the designed behaviour, the columns are hidden in target but rows dont appear hidden.
Is there a way to mention copy only visible cells to target workbook.
I dont want hidden rows & columns in my html ouput.


Thank,
Jaspreet


I tried the option

HtmlHiddenRowDisplayType but this doesnot works for rows in case i use PASTEOptions as mentioned above.


Thanks,

Jaspreet

Hi,


Well, Aspose.Cells works the same way as MS Excel does. You may confirm this behavior in MS Excel, when you have a source range of cells which contains some hidden rows and columns, when you select the range and right click on it and then click “Copy” and on some other place in the sheet click “Paste”, you will see the the hidden rows and columns are also pasted onto target range. If you find Aspose.Cells has differences with MS Excel, kindly do create a simple Java program (runnable) and paste it here to reproduce the issue on our end, we will check it soon.

Thank you.


Hi,

I agree with you. But MS Excel also gives the option in Editing where in you can select ‘visisble cells only’.
So, is there any option sismilar to this in PasteOptions that will copy only visible rows.

Thanks,
Jaspreet

Hi,


Could you give us details about the steps on how to select visible cells only while selecting the range and copying it, we will check it soon.

Thank you.

Hi,

Here is the link
http://office.microsoft.com/en-in/excel-help/copy-visible-cells-only-HA010244897.aspx

Thanks,
Jaspreet

Hi,

Thanks for referring to the document.

We understand your requirements now. We will check if we could support the feature i.e. Add an option to PasteOptions to paste only visible cells from the range or provide other means or APIs for the task. I have logged a ticket with an id "CELLSJAVA-40943" for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-40943) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.