axlsx icon indicating copy to clipboard operation
axlsx copied to clipboard

Apply style for entire column without rows added

Open csenszike opened this issue 6 years ago • 7 comments

I have to generate template XLSX with preformatted but empty cells (columns), so when a number is entered in such a cell my formatting applies.

As the example states it's not possible until rows are actually added to the sheet as I tried:

  wb.add_worksheet(name: 'Points') do |sheet|
    sheet.add_row [
      'Section [m]',
      'X',
      'Y',
      'Z',
      ], style: header
 
    sheet.col_style 0, s_number_section, row_offset: 1
  end

But adding N thousands of empty rows and generating a very big template file seems a bit ugly to me and will cause issues at the N*1000+1st row. Is there any reason it's not possible with the current library?

Thank you!

csenszike avatar May 23 '18 13:05 csenszike

curious if a format column functionality is added. If not how did you resolve this problem. @csenszike

sbpipb avatar Sep 30 '19 05:09 sbpipb

@randym, is this kind of column formatting possible with the current implementation?

lbraun avatar Mar 17 '20 15:03 lbraun

+1

souzagab avatar Apr 08 '21 16:04 souzagab

+1

luchhh avatar Jun 03 '22 15:06 luchhh

+1

luisgmartins avatar Aug 19 '22 14:08 luisgmartins

Would anyone mind to por this to https://github.com/caxlsx/caxlsx if still needed?

simi avatar Aug 20 '22 18:08 simi

Opened in https://github.com/caxlsx/caxlsx/issues/159

luisgmartins avatar Aug 22 '22 08:08 luisgmartins