ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: hirehop on May 30, 2023, 08:02:10 pm

Title: Export excel Style
Post by: hirehop on May 30, 2023, 08:02:10 pm
Hello

I wanted to export grid data in excel file with same grid style

could you help me on this?

I wanted as per picture 2

please find the attach pictures
Title: Re: Export excel Style
Post by: paramvir on May 30, 2023, 09:08:42 pm
Most of the grid styles are exported to Excel by default.

Please follow this example:

https://paramquery.com/pro/demos87/export_style
Title: Re: Export excel Style
Post by: hirehop on May 30, 2023, 09:11:49 pm
thank you for your reply

i think it will be change in the grid also
but i wanted it like only style to the excel file

other wise export same as grid with its style
i am sending you my grid picture
Title: Re: Export excel Style
Post by: paramvir on May 30, 2023, 11:12:55 pm
The data in your grid is different from the exported spreadsheet, please clarify.
Title: Re: Export excel Style
Post by: hirehop on May 31, 2023, 03:19:03 pm
data is same but style also need same
Title: Re: Export excel Style
Post by: paramvir on June 01, 2023, 05:10:35 pm
Quote
data is same but style also need same

This example: https://paramquery.com/pro/demos87/export_style has both data and style same in grid as well as in exported spreadsheet.
Title: Re: Export excel Style
Post by: hirehop on June 02, 2023, 05:40:05 pm
thank you

right now we have own CSS working on grid but its can not display in the excel , can it possible to give style with out changing grid and make style on excel.


Title: Re: Export excel Style
Post by: paramvir on June 05, 2023, 03:54:23 pm
Yes it's possible to add or modify styles in xlsx without changing the grid styles.

First export grid to 'wb' or workbook format which is a plain object whose format is mentioned here:

https://paramquery.com/pro/api/excel-workbook

Then make changes in the workbook object and export it to spreadsheet with pq.excel.exportWb() method.
Title: Re: Export excel Style
Post by: hirehop on June 05, 2023, 07:34:38 pm
Thank you once again
 its working very good
can we add filter as grid in export excel?
Title: Re: Export excel Style
Post by: paramvir on June 06, 2023, 10:09:46 pm
Exporting filter rules to xlsx is currently not supported.