Skip to content

Instantly share code, notes, and snippets.

Created March 29, 2016 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/559761b19b5c7ec45460 to your computer and use it in GitHub Desktop.
Save anonymous/559761b19b5c7ec45460 to your computer and use it in GitHub Desktop.
excel_navn.each do |navn|
$excel_name = navn
puts "Alrighty. Hvad er forsøgspersonens navn? (FX: BR253K)"
$fp = gets.chomp
puts "Opretter PDF-dokumentet for forsøgsperson:" + $fp + ". Hent en kop kaffe imens."
$xlsx = Roo::Spreadsheet.open($excel_name)
array = $xlsx.sheets
Prawn::Document.generate($excel_name.slice!(".xlsx") + ".pdf") do
array.each do |ark|
calculate(ark)
end
end
end
puts "Done, mottahfuckah!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment