search for: add_worksheet

Displaying 6 results from an estimated 6 matches for "add_worksheet".

2005 Oct 17
4
How to send excel file to browser (spreadsheat 0.3.2)
...way to add a format f1 = wb.add_format(:color=>"black",:bold=>1,:italic=>true) f2 = wb.add_format(:color=>"black") f4 = Format.new(:num_format => "d mmm yyyy") f5 = Format.new(:num_format => 0x0f) wb.add_format(f4) wb.add_format(f5) ws1 = wb.add_worksheet("timesheets") #headers @header = [''Employee'',''Address'',''Zip'',''City'',''Start date'',''Start time'',''Stop date'', ''Stop time'',''Duration'...
2008 Nov 04
0
Hi Everyone
...by on rails I installed the gem spreadsheet/excel and the spreadsheet and in my code i wrote the lines require ''spreadsheet/excel'' require ''spreadsheet'' i used to format the excel sheet wb = Spreadsheet::Excel.new(path) # creates the Excel sheet ws = wb.add_worksheet("employee") # creates the work sheet and i defined the format as the f5 = Format.new(:number_format => "#,###,##0.00") then it is generating the error as Error : uninitialized constant GenerateExcelSheet::Format then i kept as Spreadsheet::Format.new() then the...
2009 Apr 07
0
File created using Spreadsheet Excel can't read on linux
Hi All, Created xls file using spreadsheet Excel is not read on linux. I am creating an xls file are as follows workbook = Spreadsheet::Excel.new("Filepath") worksheet = workbook.add_worksheet("Sheet1") | | | workbook.close but when i am trying to download this it not get download. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups &quo...
2010 Jan 03
2
Problem with downloading a generated Excel sheet
...d it once it''s generated. Please take a look on the below code: @contacts=Contact.find(:all) if @contacts.size>0 file="#{Date.today}_Report.xls" workbook=Spreadsheet::Excel.new("#{RAILS_ROOT}/public/reports/#{file}") worksheet=workbook.add_worksheet("All Users on Database") worksheet.write(0, 0, "First Name") worksheet.write(0, 1, "Last Name") worksheet.write(0, 2, "Email") row = 2 @contacts.each do |users| worksheet.write(row, 0, "#{users.first_name...
2007 Jul 08
1
Writing Excel (.xls) files on non-Windows OSs using Perl
...($FileName, '..*'); my $FName = (fileparse ($FileName, '\..*'))[0]; # Only take the first 31 chars, which is the # limit for a worksheet name my $SheetName = substr($FName, 0, 31); print "Creating New WorkSheet: $SheetName\n\n"; my $WorkSheet = $XLSFile->add_worksheet($SheetName); # Rows and columns are zero indexed my $Row = 0; # Write to Sheet while (<CSVFILE>) { if ($csv->parse($_)) { my @Fields = $csv->fields(); my $Col = 0; foreach my $Fld (@Fields) { $WorkSheet->write($Row, $Col, $Fld);...
2007 Jan 17
12
Excel sheet generation
Hi, Does anyone know of a package that will help with generation of spreadsheets? (xls files, not csv) Thanks, Fredrik --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe