ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: gopigupta on November 14, 2022, 03:44:04 pm

Title: PQGrid export - left align numeric column header in excel file
Post by: gopigupta on November 14, 2022, 03:44:04 pm
I am using standard grid export function to export grid data into excel. The export is working correctly but the only issue I am facing is the alignment of numeric column's headers(float, int datatypes). They are aligning to right and I want them to be left aligned. I tried to use halign: "left" property which shows column header left aligned on grid but in the export file column header appears right aligned. I am using FlieSaver.js file to save blob into excel.

Please let me know any work around.


below code is used to export grid into excel file.

function ExportGridView() {
    blob = gridobj.exportData({
        format: 'xlsx',
        nopqdata: true,
        render: true,
    });
    if (typeof blob === "string") {
        blob = new Blob([blob]);
    }
    saveAs(blob, "filenametest.xlsx');   //call to FileSaver.js file
}
Title: Re: PQGrid export - left align numeric column header in excel file
Post by: paramvir on November 15, 2022, 05:12:30 pm
Header styles are not exported to Excel.

You can make the export 2 step process ( grid -> workbook -> xlsx ), identify the cell in workbook and add align property to the cell.