ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Punit on June 28, 2022, 02:52:02 pm

Title: Change ExcelSheet Cell Color
Post by: Punit on June 28, 2022, 02:52:02 pm
Dear Team,
Is there any way to change the excel sheet cell color?
Title: Re: Change ExcelSheet Cell Color
Post by: paramvir on June 28, 2022, 07:38:09 pm

Code: [Select]
  this.Selection().style('background-color', "#ff0099" );

Example: https://paramquery.com/pro/demos/import-xlsx there is colopicker in the toolbar of this example which uses the same pqgrid API to change color.
Title: Re: Change ExcelSheet Cell Color
Post by: Punit on June 29, 2022, 11:18:14 am
Dear sir,
Is there any event for changing the color by the event? We want to change cell color while copying from the cell, not by the menu.
Title: Re: Change ExcelSheet Cell Color
Post by: paramvir on June 29, 2022, 01:16:31 pm
it would be the same code inside the copy event

Code: [Select]
copy: function(){
  this.Selection().style('background-color', "#ff0099" );
}
Title: Re: Change ExcelSheet Cell Color
Post by: Punit on June 29, 2022, 06:13:46 pm
 this.Selection().style('background-color', "#ff0099" );

this code takes 5 to 7 seconds to change the cell color. This makes our functionality slow.
Title: Re: Change ExcelSheet Cell Color
Post by: paramvir on June 29, 2022, 08:10:03 pm
Please share a jsfiddle.
Title: Re: Change ExcelSheet Cell Color
Post by: Punit on June 30, 2022, 02:17:17 pm
Dear sir,
We use the same code as you give the example URL. this is working fine in local but it takes too time when we publish this code in the production environment.
Title: Re: Change ExcelSheet Cell Color
Post by: paramvir on June 30, 2022, 04:49:29 pm
The code runs in browser and it has nothing to do with local or production environment.

BTW this example https://paramquery.com/pro/demos/import-xlsx is also running in production environment.