Helpful Information
 
 
Category: ColdFusion
White Spaces in variables

We have a client who sends us a excel sheet of data which we need to grab and upload to our server. the problem is that the field names of the excel sheet have spaces in them. Querying the excel sheet is fine, but when it comes to outputing the data using the field name as a reference, I can not find anyway of doing this.

I have tried the brackets [#First Name#], but no.

I was thinking maybe theQuery.FieldName[0].value or something like that, but I don't know the syntax for that in coldfusion?

There is also a Java API called JExcel API, but I think it needs to be loaded on the coldfusion server and I don't have access to that quite yet.

Any help would be appreciated and interesting. I will keep plugging away till then.

Thanks,

codeer.:thumbsup:

Hello again,

I think I found the answer to my problem. [excelsheet].[field name] as noSpaceVariable from [excelsheet]

That works just fine. Any more comments about the JExcel API would be awesome. Thanks everyone.

Codeer:thumbsup:










privacy (GDPR)