cfspreadsheet

Query of Queries failing in Coldfusion 10

僤鯓⒐⒋嵵緔 提交于 2019-12-11 08:21:36
问题 I'm getting and error when I tried to do a query of query. Table named allData was not found in memory. The name is misspelled or the table is not defined. I have an excel document and I'm outputting to a coldfusion var called allData, then I'm doing a query on that var. but I'm getting an error: What am I doing wrong? The first dump shows the table appropriately. function name="validateExcel" access="public" output="yes" returnType="void" hint="search for dogs"> <cfspreadsheet action="read"

How to read columns with spaces from coldfusion queries?

五迷三道 提交于 2019-12-02 07:40:09
问题 I am reading data from a spreadsheet. One of the column in the spreadsheet contains spaces. For Example, Columns names are [first name,last name,roll]. I am getting a qryObj after reading the spreadsheet. Now when i am trying to read first name from the query <cfquery dbtype="query" name="getName"> SELECT [first name] FROM qryObj </cfquery> It is throwing db error. I have tried with ['first name'] also but still it is throwing error. The error is: Query Of Queries syntax error. Encountered "[

How to read columns with spaces from coldfusion queries?

荒凉一梦 提交于 2019-12-02 06:18:53
I am reading data from a spreadsheet. One of the column in the spreadsheet contains spaces. For Example, Columns names are [first name,last name,roll]. I am getting a qryObj after reading the spreadsheet. Now when i am trying to read first name from the query <cfquery dbtype="query" name="getName"> SELECT [first name] FROM qryObj </cfquery> It is throwing db error. I have tried with ['first name'] also but still it is throwing error. The error is: Query Of Queries syntax error. Encountered "[. Incorrect Select List, Incorrect select column I did crazy stuff like googling to see what people had

How to create a cfspreadsheet with protected cells

╄→гoц情女王★ 提交于 2019-12-01 18:29:22
I am creating a spreadsheet object using cfspreadsheet. Would like to make some of the individual cells as protected (read-only). Please let me know if anybody has tried this before. I did try putting cell format as locked but it did not seems to work. Here is the sample code: <cfset a = spreadsheetnew()> <cfset format1 = structNew()> <cfset format1.locked=true> <cfset SpreadsheetFormatCell(a,format1,1,1)> <cfspreadsheet action="write" filename="#expandpath('.')#/test.xls" name="a" overwrite="true"> Thanks. Locking a cell does nothing unless the sheet is protected ie using cfspreadsheet's

Spreadsheet Cell Formatting

夙愿已清 提交于 2019-11-29 12:24:00
Edit at the end Can anyone see what I am doing wrong? These are my expectations and observations: I expect a worksheet named Search Parameters to have cell a1 in bold red font. I get what I expect. I expect a worksheet named "4D,CCCU,SDAU" which has data starting in row 3. I get this. I expect row 3 to have the text "bold font 3 green true", and to be in bold green font. I get the text, but I get bold red font, which matches cell a1 in the other sheet. In fact, the formatting in this cell will always match cell a1 from the other sheet. I expect the remaining cells to have a value like "normal

Spreadsheet Cell Formatting

主宰稳场 提交于 2019-11-28 05:43:03
问题 Edit at the end Can anyone see what I am doing wrong? These are my expectations and observations: I expect a worksheet named Search Parameters to have cell a1 in bold red font. I get what I expect. I expect a worksheet named "4D,CCCU,SDAU" which has data starting in row 3. I get this. I expect row 3 to have the text "bold font 3 green true", and to be in bold green font. I get the text, but I get bold red font, which matches cell a1 in the other sheet. In fact, the formatting in this cell

Reading column format with cfspreadsheet

为君一笑 提交于 2019-11-28 02:14:40
Is it possible to get the datatype or format of a column or cell in a spreadsheet when you read it using cfspreadsheet ? I am converting spreadsheet data from an excel spreadsheet to a database table. Thus far I just format everything as varchars, but it would be good if I could specify dates as dates and integers as integers. Unfortunately, not using cfspreadsheet or the built in spreadsheet functions. They only return what is displayed , not the underlying values. However you could roll your own by tapping into the underlying POI workbook . A few things to keep in mind: Unlike database

Reading column format with cfspreadsheet

走远了吗. 提交于 2019-11-26 23:39:33
问题 Is it possible to get the datatype or format of a column or cell in a spreadsheet when you read it using cfspreadsheet ? I am converting spreadsheet data from an excel spreadsheet to a database table. Thus far I just format everything as varchars, but it would be good if I could specify dates as dates and integers as integers. 回答1: Unfortunately, not using cfspreadsheet or the built in spreadsheet functions. They only return what is displayed , not the underlying values. However you could