Skip to main content
Participant
March 21, 2012
Question

cfspreadsheet alignment issue

  • March 21, 2012
  • 1 reply
  • 490 views

SpreadsheetAddColumn(sheet,"ColumnHeading1",1,1);

preadsheetAddColumn(sheet,"column heading2",1,2);

SpreadsheetAddRows(sheet,query1,2,1);

   

SpreadsheetAddColumn(sheet,"ColumnHeading3",1,4,true);

SpreadsheetAddColumn(sheet,"ColumnHeading4",1,5,true);

SpreadsheetAddRows(sheet,query,2,4);

The above code is used to create 4 columns with data from 2 differet queries but in the spreadsheet thd data is not aligned properly.First two columns moved down when data is populated for the 2nd and 3rd column whihc led to emly cells in the 1st and 2nd columns and data starts from the

Any suggestion to avoid empty cells and diplay data from the two queries in the same order?

thanks

    This topic has been closed for replies.

    1 reply

    Inspiring
    March 21, 2012

    That is because spreadsheetAddRows manipulates entire rows, rather than individual cells. I think you will need to loop through the second query and use SpreadsheetSetCellValue() instead of add rows.