Hi Jon,
I'm happy with this utility , except this little problem.
Bellow is the code:
<cfscript>
parser = createObject("java", "com.Ostermiller.util.ExcelCSVParser") ;
fileInfo = parser.parse(fileContents) ;
noFields = arrayLen (fileInfo);
for (i = 2; i lte noFields; i = i + 1)
{
lineArray = fileInfo [i];
initSize = arrayLen (lineArray);
if (initSize lt 30)
{
msg = "Error...;
}
}
</cfscript>
I know that there are 30 fields in the file. If I open the file in
Excel I can see all of them there, but some of them have no value and
this is why the checking bombs.
If I run a replace all in excel and replace the empty fields with a
space everything is OK and the file parsing works as expected.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201457
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54