How to delete 1st 2 rows in a csv/excel file?
Hi,
Is there a way to read a csv file and delete the 1st 2 rows (or any no. of rows I would like to)?
I'm currently using Ben Nadel's GREAT piece of code (Parsing CSV Values into a Coldfusion query) found at http://www.bennadel.com/index.cfm?dax=blog:501.view as follows:
<!--- Read file --->
<cffile action="read" file="#variables.uploadedFile#" variable="csvResult">
<!--- Invoke method to convert csv data to query --->
<cfinvoke component="components.csvToQuery" method="CSVToQuery" returnvariable="qCsvData">
<cfinvokeargument name="CSV" value="#trim(variables.csvResult)#">
<cfinvokeargument name="FirstRowIsHeadings" value="true">
</cfinvoke>
I need to manipulate qCsvData to delete the 1st 2 rows.
Any ideas would be most welcome.
Thanks and regards,
Yogesh Mahadnac
