README.md in ntq_excelsior-1.2.2 vs README.md in ntq_excelsior-1.3.0

- old
+ new

@@ -32,11 +32,11 @@ name: 'Utilisateurs', extra_headers: [ [ { title: "Utilisateurs", - width: -> (context) { context[:current_user].can?(:access_to_email, User) ? 4 : 3 } + width: -> (context) { context[:current_user].can?(:access_to_email, User) ? 4 : 3 }, # width: 4, styles: [:bold] } ], ], @@ -67,11 +67,29 @@ }, { title: 'Age', resolve: 'age', type: :number - } + }, + { + title: 'Civilité', + list: ['M', 'Ms', 'Autres'] + }, + { + title: 'Active', + resolve: -> (record) { record.active ? 'Oui' : 'Non' } + # See axlsx example [here](https://github.com/caxlsx/caxlsx/blob/master/examples/list_validation_example.md) for more options + list: { + options: ['Oui', 'Non'], + show_error_message: true, + error_title: 'Active', # Optional + error: 'Authorized value: Oui non', + errorStyle: :stop, # :informations, :warning + showInputMessage: true, + prompt: 'Choose a value' + } + }, ] }) end @@ -94,11 +112,10 @@ ```ruby user_exporter = UserExporter.new(@user_data) product_exporter = ProductExporter.new(@product_data) - exporter = NtqExcelsior::MultiWorkbookExporter.new([user_exporter, product_exporter]) - stream = exporter.export.to_stream.read + exporter = NtqExcelsior::MultiWorkbookExporter.new([export1, export2]) # In ruby file File.open("export.xlsx", "w") do |tmp| tmp.binmode tmp.write(stream)