#serialize(output, confirm_valid = false) ⇒ Boolean

A tremendous amount of effort has gone into ensuring that you cannot create invalid xlsx documents.
confirm_valid should be used in the rare case that you cannot open the serialized file.

Serialize your workbook to disk as an xlsx document.

Examples:

# This is how easy it is to create a valid xlsx file. Of course you might want to add a sheet or two, and maybe some data, styles and charts.
# Take a look at the README for an example of how to do it!
#serialize to a file
p=Axlsx::Package.new# ......add cool stuff to your workbook......
p.serialize("example.xlsx")# Serialize to a stream
s=p.to_stream()File.open('example_streamed.xlsx','w'){|f|f.write(s.read)}

#validate ⇒ Array

Note:

This gem includes all schema from OfficeOpenXML-XMLSchema-Transitional.zip and OpenPackagingConventions-XMLSchema.zip
as per ECMA-376, Third edition. opc schema require an internet connection to import remote schema from dublin core for dc,
dcterms and xml namespaces. Those remote schema are included in this gem, and the original files have been altered to
refer to the local versions.

If by chance you are able to creat a package that does not validate it indicates that the internal
validation is not robust enough and needs to be improved. Please report your errors to the gem author.

Validate all parts of the package against xsd schema.

Examples:

# The following will output any error messages found in serialization.
p=Axlsx::Package.new# ... code to create sheets, charts, styles etc.
p.validate.each{|error|putserror.message}