Numeric values are exported with single quote in excel.How to export the numeric values as it is
Hello,
You can use custom export code and format your columns as required using phpexcel api.
https://www.phpgrid.org/demo/demos/export/export-phpexcel.phps (line 72)
PHPExcel docs are located here.
I have tried this also sir.i could not use custom query inside the phpexcel.the db2query could not placed inside.
You need to either connect database again inside function OR use some global variables to be accessible inside function.
i get the code for export
<Workbook xmlns=”urn:schemas-microsoft-com:office:spreadsheet” xmlns:x=”urn:schemas-microsoft-com:office:excel” xmlns:ss=”urn:schemas-microsoft-com:office:spreadsheet” xmlns:html=”http://www.w3.org/TR/REC-html40″>
<Styles>
<Style ss:ID=”sDT”><NumberFormat ss:Format=”Short Date”/></Style>
</Styles>
<Worksheet ss:Name=”Sheet1″>
<Table>
<Row>
<Cell><Data ss:Type=”String”>Id</Data></Cell>
<Cell><Data ss:Type=”String”>Route Code</Data></Cell>
<Cell><Data ss:Type=”String”>Route Name</Data></Cell>
<Cell><Data ss:Type=”String”>State Name </Data></Cell>
<Cell><Data ss:Type=”String”>District Name </Data></Cell>
<Cell><Data ss:Type=”String”>Area Name </Data></Cell>
<Cell><Data ss:Type=”String”>ASO1 Name</Data></Cell>
Check following:
- Make sure there is no new line or blank character at start / end of file.
- Check for BOM character using notepad++
- Make sure you have php’s zlib extension installed.
- If still does not work, you can still use old excel export lib and for that rename ‘PHPExcel’ folder in <phpgrid>/lib/inc/excel/ with ‘_PHPExcel’