I am doing flex4 mxml web application,i am trying to export data from datagrid to excel,but when i running my code i got this following error:
TypeError: Error #2007: Parameter value must be non-null.
at com.as3xls.xls::ExcelFile/saveToByteArray()[/Users/manuelwudka-robles/Documents/Flex Builder 3/as3xls/com/as3xls/xls/ExcelFile.as:257]
at com.ci.view::Reports/exportToExcel()[C:\Documents and Settings\TIVL\Adobe Flash Builder 4\CommissionManager1410\src\com\ci\view\Reports.mxml:680]
at com.ci.view::Reports/___Reports_Button2_click()[C:\Documents and Settings\TIVL\Adobe Flash Builder 4\CommissionManager1410\src\com\ci\view\Reports.mxml:717]
this is my code:
private function exportToExcel():void
sheet = new Sheet();
var dataProviderCollection:ArrayCollection =
Reportgrid.dataProvider as ArrayCollection;
var rowCount:int = dataProviderCollection.length;
var record:Object =
/*insert record starting from row no 2 else
headers will be overwritten*/
var xls:ExcelFile = new ExcelFile ();
var bytes:ByteArray = xls.saveToByteArray();----->when this line comes the above error showing,
var fr:FileReference = new FileReference();
How to solve this.
Looking for useful suggession or sample snippet.
Thanks in advance,
You are using a 3rd party actionscript library. You will have a better chance of getting a response by asking on their forums.