Leftbower / cfspreadsheet-lucee-5

A cfspreadsheet extension for Lucee 5
23 stars 10 forks source link

columnnames has no effect at action="update" (action="write" is working fine) #7

Open Meikelv opened 7 years ago

Meikelv commented 7 years ago

Hi, I define my columnnames as follows:

<cfset Spaltennamen="Name of Col 1, Name of Col 2">

Then I write my query into a spreadsheet: <cfspreadsheet action="write" filename="#report#" query="AE_SUCH1" sheetname="Pat. mit Data 1" overwrite="true" columnnames="#Spaltennamen#" autoSizeColumns="true">

The second run is neccessary to add a second sheet in the same xls-File:

<cfspreadsheet action="update" filename="#report#" query="AE_SUCH2" sheetname="Pat. mit Data 2" columnnames="#Spaltennamen#" autoSizeColumns="true">

Result is: Sheet 1 has Columnnames, sheet 2 hasn't and the data in Sheet 2 are starting in row 1.

Work around is possible: Just insert a row with the columnnames at the beginning of the query.

Is it possible to add the command "columnnames" into action "update"?

Thank you

Michael