Author Topic: Expand the columns while export pivot grid in Excel  (Read 333 times)

vijay@spinetechnologies

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 87
    • View Profile
Expand the columns while export pivot grid in Excel
« on: March 28, 2023, 04:23:03 pm »
Hi Paramvir,

I have applied a pqGrid with Pivot functionality. The columns of the pivot are in collapsed mode by default.

While exporting the grid, I want to expand the columns in the generated files. Currently, the collapsed columns are in the hidden format in the exported file.

For your reference, I am attaching a file.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Expand the columns while export pivot grid in Excel
« Reply #1 on: March 28, 2023, 10:24:16 pm »
you can generate intermediate js workbook ( exportData method ) and make all the columns visible ( by iterating over every column ) before exporting workbook to xlsx file ( pq.excel.exportWb method )
« Last Edit: March 29, 2023, 03:46:58 pm by paramvir »

vijay@spinetechnologies

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 87
    • View Profile
Re: Expand the columns while export pivot grid in Excel
« Reply #2 on: March 29, 2023, 10:54:53 am »
Hi Paramvir,

I try to implement the above method but did not get the expected result.

Can you please provide me with an example of this method? It will help me a lot.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Expand the columns while export pivot grid in Excel
« Reply #3 on: March 29, 2023, 09:36:48 pm »