Excel-Writer-XLSX-0.96/ 000755 000765 000024 00000000000 13157063032 014617 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/.travis.yml 000644 000765 000024 00000000171 13032306505 016724 0 ustar 00John staff 000000 000000 language: perl
perl:
- "5.22"
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"
sudo: false
Excel-Writer-XLSX-0.96/bin/ 000755 000765 000024 00000000000 13157063030 015365 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/Changes 000644 000765 000024 00000052236 13157062445 016131 0 ustar 00John staff 000000 000000 Revision history for Perl module Excel::Writer::XLSX.
+ New feature/improvement.
- Removed/deprecated feature.
! Bug fix.
0.96 2017-09-16
+ Added icon sets to conditional formatting. Feature request #116.
0.95 2016-06-13
+ Added workbook set_size() method. Feature request #59.
0.94 2016-06-07
+ Added font support to chart tables.
Feature request #96.
0.93 2016-06-07
+ Added trendline properties: intercept, display_equation and
display_r_squared. Feature request #153.
0.92 2016-06-01
! Fix for insert_image issue when handling images with zero dpi.
0.91 2016-05-31
+ Add set_custom_property() workbook method to set custom document
properties.
0.90 2016-05-13
+ Added get_worksheet_by_name() workbook method to retrieve a worksheet
in a workbook by name.
Feature request #124.
! Fixed issue where internal file creation and modification dates where
in the local timezone instead of UTC.
Issue #162.
! Fixed issue with "external:" urls with space in sheetname.
! Fixed issue where Unicode full-width number strings were treated as
numbers in write().
Issue #160.
0.89 2016-04-16
+ Added write_boolean() worksheet method to write Excel boolean values.
0.88 2016-01-14
+ Added transparency option to solid fills in chart areas.
+ Added options to configure chart axis tick placement.
Feature request #158.
0.87 2016-01-12
+ Added chart pattern and gradient fills.
+ Added option to set chart tick interval.
+ Add checks for valid and non-duplicate worksheet table names.
+ Added support for table header formatting and a fix for wrapped lines in
the header.
0.86 2015-10-19
! Fix to allow chartsheets to support combined charts.
! Fix for images with negative offsets.
+ Allow hyperlinks longer than 255 characters when the link and anchor
are each less than or equal to 255 characters.
+ Added hyperlink_base document property.
+ Added option to allow data validation input messages with the тanyт
validate parameter.
Issue #144.
+ Added "stop if true" feature to conditional formatting.
Issue #138.
+ Added better support and documentation for html colours throughout
the module. The use of the Excel97 colour palette is supported for
backward compatibility but deprecated.
Issue #97.
0.85 2015-08-05
! Fixes for new redundant sprintf arguments warnings in perl 5.22.
Issue #134.
! Fix url encoding of links to external files and dirs.
0.84 2015-04-21
+ Added support for chart axis display units (thousands, million, etc.).
+ Added option to set printing in black and white. Issue #125.
+ Added chart styles example.
+ Added gradient fill support.
+ Added support for clustered charts.
+ Added support for boolean error codes.
0.83 2015-3-17
+ Added option to combine two different chart types. For example to
create a Pareto chart.
0.82 2015-3-14
+ Added extra documentation on how to handle VBA macros and added
automatic and manual setting of workbook and worksheet VBA codenames.
Issue #60.
+ Fix for set_start_page() for values > 1.
+ Fix to copy user defined chart properties, such as trendlines,
so that they aren't overwritten.
Issue #121.
+ Added column function_value option to add_table to allow
function value to be set.
+ Allow explicit text categories in charts.
Issue #102
+ Fix for column/bar gap/overlap on y2 axis.
Issue #113.
0.81 2014-11-01
+ Added chart axis line and fill properties.
0.80 2014-10-29
+ Chart Data Label enhancements. Added number formatting, font handling
(issue #106), separator (issue #107) and legend key.
+ Added chart specific handling of data label positions since not all
positions are available for all chart types. Issue #110.
0.79 2014-10-16
+ Added option to add images to headers and footers.
+ Added option to not scale header/footer with page.
! Fixed issue where non 96dpi images were not scaled properly in Excel.
! Fix for issue where X axis title formula was overwritten by the
Y axis title.
0.78 2014-09-28
+ Added Doughnut chart with set_rotation() and set_hole_size()
methods.
+ Added set_rotation() method to Pie charts.
+ Added set_calc_mode() method to control automatic calculation of
formulas when worksheet is opened.
0.77 2014-05-06
! Fix for incorrect chart offsets in insert_chart() and set_size().
Reported by Kevin Gilpin.
0.76 2013-12-31
+ Added date axis handling to charts.
+ Added support for non-contiguous chart ranges.
! Fix to remove duplicate set_column() entries.
0.75 2013-12-02
+ Added interval unit option for category axes.
! Fix for axis name font rotation. Issue #83.
! Fix for several minor issues with Pie chart legends.
0.74 2013-11-17
! Improved defined name validation.
Issue #82.
+ Added set_title() option to turn off automatic title.
Issue #81.
+ Allow positioning of plotarea, legend, title and axis names.
Issue #80.
! Fix for modification of user params in conditional_formatting().
Issue #79.
! Fix for star style markers.
0.73 2013-11-08
+ Added custom error bar option to charts.
! Fix for tables added in non-sequential order.
! Fix for scatter charts with markers on non-marker series.
0.72 2013-08-28
! Fix for charts and images that cross rows and columns that are
hidden or formatted but which donтt have size changes.
0.71 2013-08-24
! Fixed issue in image handling.
! Added fix to ensure formula calculation on load regardless of
Excel version.
0.70 2013-07-30
! Fix for rendering images that are the same size as cell boundaries.
GitHub issue #70.
! Added fix for inaccurate column width calculation.
+ Added Chart line smoothing option.
0.69 2013-06-12
+ Added chart font rotation property. Mainly for use with date axes
to make the display more compact.
! Fix for 0 data in Worksheet Tables. #65.
Reported by David Gang.
0.68 2013-06-06
! Fix for issue where shapes on one worksheet corrupted charts on a
subsequent worksheet. #52.
! Fix for issue where add_button() invalidated cell comments in the
same workbook. #64.
0.67 2013-05-06
! Fix for set_selection() with cell range.
0.66 2013-04-12
! Fix for issue with image scaling.
0.65 2012-12-31
+ Added options to format series Gap/Overlap for Bar/Column charts.
0.64 2012-12-22
+ Added the option to format individual points in a chart series.
This allows Pie chart segments to be formatted.
0.63 2012-12-19
+ Added Chart data tools such as:
Error Bars
Up-Down Bars
High-Low Lines
Drop Lines.
See the chart_data_tool.pl example.
0.62 2012-12-12
+ Added option for adding a data table to a Chart X-axis.
See output from chart_data_table.pl example.
0.61 2012-12-11
+ Allow a cell url string to be over written with a number or formula
using a second write() call to the same cell. The url remains intact.
Issue #48.
+ Added set_default_row() method to set worksheet default values for
rows.
+ Added Chart set_size() method to set the chart dimensions.
0.60 2012-12-05
+ Added Excel form buttons via the worksheet insert_button() method.
This allows the user to tie the button to an embedded macro imported
using add_vba_project().
The portal to the dungeon dimensions is now fully open.
! Fix escaping of special character in URLs to write_url().
Issue #45.
! Fix for 0 access/modification date on vbaProject.bin files extracted
using extract_vba. The date isn't generally set correctly in the
source xlsm file but this caused issues on Windows.
0.59 2012-11-26
+ Added macro support via VBA projects extracted from existing Excel
xlsm files. User defined functions can be called from worksheets
and macros can be called by the user but they cannot, currently,
be linked to form elements such as buttons.
0.58 2012-11-23
+ Added chart area and plot area formatting.
0.57 2012-11-21
+ Add major and minor axis chart gridline formatting.
0.56 2012-11-18
! Fix for issue where chart creation order had to be the same
as the insertion order or charts would be out of sync.
Frederic Claude Sievert and Hurricup. Issue #42.
! Fixed issue where gridlines didn't work in Scatter and Stock
charts. Issue #41.
! Fixed default XML encoding to avoid/solve various issues with XML
encoding created by the XML changes in version 0.51. Issue #43.
0.55 2012-11-10
+ Added Sparklines.
! Fix for issue with "begins with" and "ends with" Conditional
Formatting. Issue #40.
0.54 2012-11-05
+ Added font manipulation to Charts.
+ Added number formats to Chart axes.
+ Added Radar Charts.
! Fix for XML encoding in write_url() internal/external
links. Issue #37.
0.53 2012-10-10
! Fix for broken MANIFEST file.
0.52 2012-10-09
! Added dependency on Date::Calc to xl_parse_date.t test.
Closes #30 and RT#79790.
! Fix for XML encoding of URLs. Closes #31.
+ Refactored XMLWriter into a single class. This breaks the last
remaining ties to XML::Writer to allow for future additions
and optimisations. Renamed methods for consistency.
0.51 2012-09-16
+ Speed optimisations.
This release contains a series of optimisations aimed
at increasing the speed of Excel::Writer::XLSX. The
overall improvement is around 66%.
See the SPEED AND MEMORY USAGE section of the documentation.
+ Memory usage optimisations.
This fixes an issue where the memory used for the worksheet
data tables was freed but then brought back into usage due
to the use of an array as the base data structure. This
meant that the memory usage still continued to grow with
large row counts.
! Added warning about Excel limit to 65,530 urls per worksheet.
! Limit URLs to Excel's limit of 255 chars. Fixes Issue #26.
! Fix for whitespace in urls. Fixes Issue #25.
! Fix for solid fill of type 'none' is chart series.
Closes issue #27 reported on Stack Overflow.
! Modified write_array_formula() to apply format over full range.
Fixes issue #18.
! Fix for issue with chart formula referring to non-existent sheet name.
It is now a fatal error to specify a chart series formula that
refers to an non-existent worksheet name. Fixes issue #17.
0.50 2012-09-09
+ Added option to add secondary axes to charts.
Thanks to Eric Johnson and to Foxtons for sponsoring the work.
+ Added add_table() method to add Excel tables to worksheets.
! Fix for right/left auto shape connection when destination
is left of source shape. Thanks to Dave Clarke for fix.
! Fix for issue #16. Format::copy() method not protecting values.
The Format copy() method over-writes certain new properties that
weren't in Spreadsheet::WriteExcel. This fixes the issue by
storing and restoring the properties during copy.
! Fix for issue #15: write_url with local sub directory.
Local sub-directories were incorrectly treated as
file:// external.
! Fix for for issue #14: Non-numeric data in chart value axes
are now converted to zero in chart data cache, as required
by Excel.
0.49 2012-07-12
+ Added show_blanks_as() chart method to control the display of
blank data.
+ Added show_hidden_data() chart method to control the display of
data in hidden rows and columns.
! Added fix for fg/bg colours in conditional formats which are
shared with cell formats.
Reported by Patryk Kwiatkowski.
! Fix for xl_parse_time() with hours > 24. Github issue #11.
! Fixed lc() warning in Utility.pm in recent perls. Github issue #10.
! Fixed issue with non-integer shape dimensions. Thanks Dave Clarke.
! Fixed error handling for shape connectors. Thanks Dave Clarke.
0.48 2012-06-25
+ Added worksheet shapes. A major new feature.
Patch, docs, tests and example programs by Dave Clarke.
+ Added stacked and percent_stacked chart subtypes to Area charts.
! Added fix for chart names in embedded charts.
Reported by Matt Freel.
! Fixed bug with Unicode characters in rich strings.
Reported by Michiel van Rhee.
0.47 2012-04-10
+ Additional conditional formatting options such as color, type and value
for 2_color_scale, 3_color_scale and data_bar. Added option for non-
contiguous data ranges as well.
+ Additional chart data label parameters such as position, leader lines
and percentage. Initial patch by George E. Tarrant III.
! Fixed for Autofilter filter_column() offset bug reported by
Krishna Rajendran.
! Fix for write_url() where url contains invalid whitespace, RT #75808,
reported by Oleg G. The write_url() method now throws a warning and
rejects the invalid url to avoid file corruption.
0.46 2012-02-10
! Fix for x-axis major/minor units in scatter charts.
Reported by Carey Drake.
0.45 2012-01-09
! Changed from File::Temp tempdir() to newdir() to cleanup the temp dir at
object destruction rather than the program exit. Also improved error
reporting when mkdir() fails.
Reported by Kevin Ruscoe.
! Fix to escape control characters in strings.
Reported by Kevin Ruscoe.
0.44 2012-01-05
! Fix for missing return value from Workbook::close() with filehandles.
RT 73724. Reported and patched by Charles Bailey.
! Fixed support special filename/filehandle '-'.
RT 73424. Reported by YuvalL and Charles Bailey.
! Fix for non-working reverse x_axis with Scatter charts.
Reported by Viqar Abbasi.
0.43 2011-12-18
+ Added chart axis label position option.
+ Added invert_if_negative option for chart series fills.
0.42 2011-12-17
! Fix for set_optimization() where first row isn't 0.
Reported by Giulio Orsero.
! Fix to preserve whitespace in inline strings.
Reported by Giulio Orsero.
0.41 2011-12-10
! Increased IO::File requirement to 1.14 to prevent taint issues on some
5.8.8/5.8.6 platforms.
0.40 2011-12-07
! Fix for unreadable xlsx files when generator program has -l on the
commandline or had redefined $/. Github issue #7.
Reported by John Riksten.
0.39 2011-12-03
! Fix for spurious Mac ._Makefile.PL in the distro which prevented
automated testing and installation. Github issue #5.
Reported by Tobias Oetiker.
! Fix for failing test sub_convert_date_time.t due to extra precision
on longdouble perls. RT #71762
Reported by Douglas Wilson.
0.38 2011-12-03
+ Backported from perl 5.10.0 to perl 5.8.2.
You are killing me guys. Killing me.
0.37 2011-12-02
+ Added additional axis options: minor and major units, log base
and axis crossing.
0.36 2011-11-29
+ Added "min" and "max" options to axis ranges via set_x_axis() and
set_y_axis.
0.35 2011-11-27
+ Added Scatter chart subtypes: markers_only (the default),
straight_with_markers, straight, smooth_with_markers and smooth.
0.34 2011-11-04
+ Added set_optimization() method to reduce memory usage for very large
data sets.
0.33 2011-10-28
+ Added addition conditional formatting types: cell, date, time_period,
text, average, duplicate, unique, top, bottom, blanks, no_blanks,
errors, no_errors, 2_color_scale, 3_color_scale, data_bar and formula.
0.32 2011-10-20
! Fix for format alignment bug.
Reported by Roderich Schupp.
0.31 2011-10-18
+ Added basic conditional formatting via the conditional_format()
Worksheet method. More conditional formatting types will follow.
+ Added conditional_format.pl example program.
0.30 2011-10-06
+ Added stacked and percent_stacked chart subtypes to Bar and Column
chart types.
0.29 2011-10-05
+ Added the merge_range_type() method for finer control over the types
written using merge_range().
0.28 2011-10-04
+ Added default write_formula() value for compatibility with Google docs.
+ Updated Example.pm docs with Excel 2007 images.
0.27 2011-10-02
+ Excel::Writer::XLSX is now 100% functionally and API compatible
with Spreadsheet::WriteExcel.
+ Added outlines and grouping functionality.
+ Added outline.pl and outline_collapsed.pl example programs.
0.26 2011-10-01
+ Added cell comment methods and options.
Thanks to Barry Downes for providing the interim functionality
+ Added comments1.pl and comments2.pl example programs.
0.25 2011-06-16
+ Added option to add defined names to workbooks and worksheets.
Added defined_name.pl example program.
! Fix for fit_to_pages() with zero values.
Reported by Aki Huttunen.
0.24 2011-06-11
+ Added data validation and data_validate.pl example.
+ Added the option to turn off data series in chart legends.
0.23 2011-05-26
! Fix for charts ranges containing empty values.
0.22 2011-05-22
+ Added 'reverse' option to set_x_axis() and set_y_axis() in
charts.
0.21 2011-05-11
! Fixed support for filehandles.
+ Added write_to_scalar.pl and filehandle.pl example programs.
0.20 2011-05-10
! Fix for programs running under taint mode.
+ Added set_tempdir().
! Fix for color formatting in chartsheets.
0.19 2011-05-05
+ Added new chart formatting options for line properties,
markers, trendlines and data labels. See Chart.pm.
+ Added partial support for insert_image().
+ Improved backward compatibility for deprecated methods
store_formula() and repeat_formula().
! Fixed missing formatting for array formulas.
Reported by Cyrille Gourves.
! Fixed issue with chart scaling that caused "unreadable content"
Excel error.
0.18 2011-04-07
+ Added set_properties() method to add document properties.
Added properties.pl and tests.
0.17 2011-04-04
+ Added charting feature. See Chart.pm.
! Fix for file corruption issue when there are more than 10 custom colours.
Reported by Brian R. Landy.
0.16 2011-03-04
! Clarified support for deprecated methods in documentation and added
backward compatible methods in some cases.
! Fix for center_horizontally() issue.
Reported by Giulio Orsero.
! Fix for number like strings getting written as strings instead of numbers.
Reported by Giulio Orsero.
0.15 2011-03-01
! Fix for issues with set_row() not passing on format to cells
in the row. Reported by Giulio Orsero.
! Fixes for related issue in set_column().
0.14 2011-02-26
+ Added write_rich_string() method to write a string with multiple
formats.
+ Added rich_strings.pl example program.
+ Added set_1904() method for dates with a 1904 epoch.
+ Added date_time.pl example program.
! Fixed issue where leading and trailing whitespace in cell strings
wasn't preserved.
0.13 2011-02-22
+ Added additional page setup methods:
set_zoom()
right_to_left()
hide_zero()
set_custom_color()
set_tab_color()
protect()
+ Added Cell property methods:
set_locked()
set_hidden()
+ Added example programs:
hide_sheet.pl
protection.pl
right_to_left.pl
tab_colors.pl
0.12 2011-02-19
+ Added set_selection() method for selecting cells.
0.11 2011-02-17
! Fix for temp dirs not been removed after xlsx file creation.
http://rt.cpan.org/Ticket/Display.html?id=65816
Reported by Andreas Koenig.
0.10 2011-02-17
+ Added freeze_panes() and split_panes().
+ Added panes.pl example program.
0.09 2011-02-13
+ Added write_url() for internal and external hyperlinks.
+ Added hyperlink1+2.pl example programs.
0.08 2011-02-03
+ Added autofilter(), column_filter() and column_filter_list() methods.
+ Added autofilter.pl example program.
0.07 2011-01-28
+ Added additional Page Setup methods.
set_page_view()
repeat_rows()
repeat_columns()
hide_gridlines()
print_row_col_headers()
print_area()
print_across()
fit_to_pages()
set_start_page()
set_print_scale()
set_h_pagebreaks()
set_v_pagebreaks()
+ Added headers.pl example program.
0.06 2011-01-19
! Added fix for XML characters in attributes.
Reported by John Roll.
+ Added initial Page Setup methods.
set_landscape()
set_portrait()
set_paper()
center_horizontally()
center_vertically()
set_margins()
set_header()
set_footer()
0.05 2011-01-04
+ Added support for array_formulas. See the docs for write_array_formula()
and the example program.
0.04 2011-01-03
+ Added merge_range() for merging cells. With tests and examples.
0.03 2011-01-03
+ Optimisations. The module is now 100% faster.
0.02 2010-10-12
! Fixed dependencies in Makefile.
0.01 2010-10-11
First CPAN release.
Excel-Writer-XLSX-0.96/CONTRIBUTING.md 000644 000765 000024 00000012407 13032306505 017051 0 ustar 00John staff 000000 000000 # Excel::Writer::XLSX: Bug Reports and Pull Requests
## Reporting Bugs
Here are some tips on reporting bugs in Excel::Writer::XLSX.
### Upgrade to the latest version of the module
The bug you are reporting may already be fixed in the latest version of the
module. You can check which version of Excel::Writer::XLSX that you are using as follows:
perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Excel::Writer::XLSX
The [Changes](https://github.com/jmcnamara/excel-writer-xlsx/blob/master/Changes) file lists what has changed in the latest versions.
### Read the documentation
Read or search the [Excel::Writer::XLSX documentation](https://metacpan.org/pod/Excel::Writer::XLSX) to see if the issue you are encountering is already explained.
### Look at the example programs
There are [many example programs](https://metacpan.org/pod/Excel::Writer::XLSX::Examples) in the distribution. Try to identify an example program that corresponds to your query and adapt it to use as a bug report.
### Pointers for submitting a bug report
1. Describe the problem as clearly and as concisely as possible.
2. Include a sample program. This is probably the most important step. It is generally easier to describe a problem in code than in written prose.
3. The sample program should be as small as possible to demonstrate the problem. Don't copy and paste large non-relevant sections of your program.
### Sample Bug Report
A sample bug report is shown below. This format helps to analyse and respond to the bug report more quickly.
> **Issue with SOMETHING**
>
> I am using Excel::Writer::XLSX and I have encountered a problem. I
> want it to do SOMETHING but the module appears to do SOMETHING_ELSE.
>
> Here is some code that demonstrates the problem.
>
> #!/usr/bin/perl -w
>
> use strict;
> use Excel::Writer::XLSX;
>
> my $workbook = Excel::Writer::XLSX->new("reload.xls");
> my $worksheet = $workbook->add_worksheet();
>
> $worksheet->write(0, 0, "Hi Excel!");
>
> __END__
>
There is also a [bug_report.pl](https://github.com/jmcnamara/excel-writer-xlsx/blob/master/examples/bug_report.pl) program in the distro which will generate a sample report with module version numbers.
### Use the Excel::Writer::XLSX GitHub issue tracker
Submit the bug report using the [Excel::Writer::XLSX issue tracker](https://github.com/jmcnamara/excel-writer-xlsx/issues).
## Pull Requests and Contributing to Excel::Writer::XLSX
All patches and pull requests are welcome but must start with an issue tracker.
### Getting Started
1. Pull requests and new feature proposals must start with an [issue tracker](https://github.com/jmcnamara/excel-writer-xlsx/issues). This serves as the focal point for the design discussion.
2. Describe what you plan to do. If there are API changes add some code example to demonstrate them.
3. Fork the repository.
4. Run all the tests to make sure the current code work on your system using `make test`.
5. Create a feature branch for your new feature.
6. Enable Travis CI on your fork, see below.
### Enabling Travis CI via your GitHub account
Travis CI is a free Continuous Integration service that will test any code you push to GitHub with Perl 5.8, 5.10, 5.12, 5.14, 5.16 and 5.18.
See the [Travis CI Getting Started](http://about.travis-ci.org/docs/user/getting-started/) instructions.
Note there is already a `.travis.yml` file in the Excel::Writer::XLSX repo so that doesn't need to be created.
### Writing Tests
This is the most important step. Excel::Writer::XLSX has approximately 1000 tests and a 2:1 test to code ratio. Patches and pull requests for anything other than minor fixes or typos will not be merged without tests.
Use the existing tests in [the test directory](https://github.com/jmcnamara/excel-writer-xlsx/tree/master/t) for examples.
Ideally, new features should be accompanied by tests that compare Excel::Writer::XLSX output against actual Excel 2007 files. See the [regression](https://github.com/jmcnamara/excel-writer-xlsx/tree/master/t/regression) test files for examples. If you don't have access to Excel 2007 I can help you create input files for test cases.
### Code Style
Follow the general style of the surrounding code and format it format it with [perltidy](http://perltidy.sourceforge.net) and the following options:
-mbl=2 -pt=0 -nola
### Running tests
Tests can be run locally as follows:
prove -l -r t/
When you push your changes they will also be tested using [Travis CI](https://travis-ci.org/jmcnamara/excel-writer-xlsx/) as explained above.
### Documentation
If your feature requires it then write some POD documentation.
### Example programs
If applicable add an example program to the `examples` directory.
### Copyright and License
Copyright remains with the original author. Do not include additional copyright claims or Licensing requirements. GitHub and the `git` repository will record your contribution an it will be acknowledged it in the Changes file.
### Submitting the Pull Request
If your change involves several incremental `git` commits then `rebase` or `squash` them onto another branch so that the Pull Request is a single commit or a small number of logical commits.
Push your changes to GitHub and submit the Pull Request with a hash link to the to the Issue tracker that was opened above.
Excel-Writer-XLSX-0.96/examples/ 000755 000765 000024 00000000000 13157063032 016435 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/lib/ 000755 000765 000024 00000000000 13157063030 015363 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/Makefile.PL 000644 000765 000024 00000002762 13032306505 016575 0 ustar 00John staff 000000 000000 #!/usr/bin/perl
use ExtUtils::MakeMaker;
use strict;
use warnings;
require 5.008002;
my %deps = (
'Archive::Zip' => 1.30,
'IO::File' => 1.14,
'File::Temp' => 0.19,
);
my %resources = (
homepage => 'http://jmcnamara.github.com/excel-writer-xlsx/',
repository => 'http://github.com/jmcnamara/excel-writer-xlsx',
bugtracker => 'http://github.com/jmcnamara/excel-writer-xlsx/issues',
MailingList => 'http://groups.google.com/group/spreadsheet-writeexcel',
);
my %params = (
'AUTHOR' => 'John McNamara (jmcnamara@cpan.org)',
'ABSTRACT' => 'Create a new file in the Excel 2007+ XLSX format.',
'NAME' => 'Excel::Writer::XLSX',
'VERSION_FROM' => 'lib/Excel/Writer/XLSX.pm',
'NEEDS_LINKING' => 0,
'dist' => { COMPRESS => 'gzip --best', SUFFIX => 'gz' },
'PREREQ_PM' => \%deps,
'EXE_FILES' => ['bin/extract_vba'],
'test' => { TESTS => 't/*/*.t t/*/*/*.t' }
);
if ( $ExtUtils::MakeMaker::VERSION ge '6.46' ) {
$params{META_MERGE} = { resources => \%resources };
}
if ( $ExtUtils::MakeMaker::VERSION ge '6.30_01' ) {
$params{LICENSE} = 'perl';
}
WriteMakefile(%params);
###############################################################################
#
# Additional target for Excel::Writer::XLSX:
# mydocs: make the Examples.pm doc.
#
sub MY::postamble {
"mydocs:\n"
. "\tperl -Mblib examples/gen_examples_pod.pl examples "
. "> lib/Excel/Writer/XLSX/Examples.pm\n\n";
}
Excel-Writer-XLSX-0.96/MANIFEST 000644 000765 000024 00000171156 13157063032 015763 0 ustar 00John staff 000000 000000 .travis.yml
CONTRIBUTING.md
Changes
MANIFEST
Makefile.PL
README
bin/extract_vba
examples/README
examples/a_simple.pl
examples/array_formula.pl
examples/autofilter.pl
examples/bug_report.pl
examples/cgi.pl
examples/chart_area.pl
examples/chart_bar.pl
examples/chart_clustered.pl
examples/chart_column.pl
examples/chart_combined.pl
examples/chart_data_table.pl
examples/chart_data_tools.pl
examples/chart_doughnut.pl
examples/chart_line.pl
examples/chart_pareto.pl
examples/chart_pie.pl
examples/chart_radar.pl
examples/chart_scatter.pl
examples/chart_secondary_axis.pl
examples/chart_stock.pl
examples/chart_styles.pl
examples/colors.pl
examples/comments1.pl
examples/comments2.pl
examples/conditional_format.pl
examples/data_validate.pl
examples/date_time.pl
examples/defined_name.pl
examples/demo.pl
examples/diag_border.pl
examples/filehandle.pl
examples/formats.pl
examples/gen_examples_pod.pl
examples/headers.pl
examples/hide_row_col.pl
examples/hide_sheet.pl
examples/hyperlink1.pl
examples/hyperlink2.pl
examples/indent.pl
examples/macros.pl
examples/merge1.pl
examples/merge2.pl
examples/merge3.pl
examples/merge4.pl
examples/merge5.pl
examples/merge6.pl
examples/mod_perl1.pl
examples/mod_perl2.pl
examples/outline.pl
examples/outline_collapsed.pl
examples/panes.pl
examples/properties.pl
examples/protection.pl
examples/regions.pl
examples/republic.png
examples/rich_strings.pl
examples/right_to_left.pl
examples/sales.pl
examples/shape1.pl
examples/shape2.pl
examples/shape3.pl
examples/shape4.pl
examples/shape5.pl
examples/shape6.pl
examples/shape7.pl
examples/shape8.pl
examples/shape_all.pl
examples/sparklines1.pl
examples/sparklines2.pl
examples/stats.pl
examples/stats_ext.pl
examples/stocks.pl
examples/tab_colors.pl
examples/tables.pl
examples/unicode_2022_jp.pl
examples/unicode_2022_jp.txt
examples/unicode_8859_11.pl
examples/unicode_8859_11.txt
examples/unicode_8859_7.pl
examples/unicode_8859_7.txt
examples/unicode_big5.pl
examples/unicode_big5.txt
examples/unicode_cp1251.pl
examples/unicode_cp1251.txt
examples/unicode_cp1256.pl
examples/unicode_cp1256.txt
examples/unicode_cyrillic.pl
examples/unicode_koi8r.pl
examples/unicode_koi8r.txt
examples/unicode_polish_utf8.pl
examples/unicode_polish_utf8.txt
examples/unicode_shift_jis.pl
examples/unicode_shift_jis.txt
examples/vbaProject.bin
examples/write_handler1.pl
examples/write_handler2.pl
examples/write_handler3.pl
examples/write_handler4.pl
examples/write_to_scalar.pl
lib/Excel/Writer/XLSX.pm
lib/Excel/Writer/XLSX/Chart.pm
lib/Excel/Writer/XLSX/Chart/Area.pm
lib/Excel/Writer/XLSX/Chart/Bar.pm
lib/Excel/Writer/XLSX/Chart/Column.pm
lib/Excel/Writer/XLSX/Chart/Doughnut.pm
lib/Excel/Writer/XLSX/Chart/Line.pm
lib/Excel/Writer/XLSX/Chart/Pie.pm
lib/Excel/Writer/XLSX/Chart/Radar.pm
lib/Excel/Writer/XLSX/Chart/Scatter.pm
lib/Excel/Writer/XLSX/Chart/Stock.pm
lib/Excel/Writer/XLSX/Chartsheet.pm
lib/Excel/Writer/XLSX/Drawing.pm
lib/Excel/Writer/XLSX/Examples.pm
lib/Excel/Writer/XLSX/Format.pm
lib/Excel/Writer/XLSX/Package/App.pm
lib/Excel/Writer/XLSX/Package/Comments.pm
lib/Excel/Writer/XLSX/Package/ContentTypes.pm
lib/Excel/Writer/XLSX/Package/Core.pm
lib/Excel/Writer/XLSX/Package/Custom.pm
lib/Excel/Writer/XLSX/Package/Packager.pm
lib/Excel/Writer/XLSX/Package/Relationships.pm
lib/Excel/Writer/XLSX/Package/SharedStrings.pm
lib/Excel/Writer/XLSX/Package/Styles.pm
lib/Excel/Writer/XLSX/Package/Table.pm
lib/Excel/Writer/XLSX/Package/Theme.pm
lib/Excel/Writer/XLSX/Package/VML.pm
lib/Excel/Writer/XLSX/Package/XMLwriter.pm
lib/Excel/Writer/XLSX/Shape.pm
lib/Excel/Writer/XLSX/Utility.pm
lib/Excel/Writer/XLSX/Workbook.pm
lib/Excel/Writer/XLSX/Worksheet.pm
t/chart/area/sub_write_xml_declaration.t
t/chart/bar/sub_write_bar_dir.t
t/chart/bar/sub_write_grouping.t
t/chart/bar/sub_write_xml_declaration.t
t/chart/column/sub_write_xml_declaration.t
t/chart/line/sub_write_xml_declaration.t
t/chart/pie/sub_write_xml_declaration.t
t/chart/scatter/sub_write_xml_declaration.t
t/chart/stock/sub_write_xml_declaration.t
t/chart/sub_add_series.t
t/chart/sub_process_names.t
t/chart/sub_write_a_latin.t
t/chart/sub_write_auto.t
t/chart/sub_write_ax_id.t
t/chart/sub_write_ax_pos.t
t/chart/sub_write_chart_space.t
t/chart/sub_write_cross_ax.t
t/chart/sub_write_crosses.t
t/chart/sub_write_d_lbls.t
t/chart/sub_write_format_code.t
t/chart/sub_write_idx.t
t/chart/sub_write_label_align.t
t/chart/sub_write_label_offset.t
t/chart/sub_write_lang.t
t/chart/sub_write_layout.t
t/chart/sub_write_legend.t
t/chart/sub_write_legend_pos.t
t/chart/sub_write_major_gridlines.t
t/chart/sub_write_marker.t
t/chart/sub_write_marker_size.t
t/chart/sub_write_marker_value.t
t/chart/sub_write_num_cache.t
t/chart/sub_write_number_format.t
t/chart/sub_write_order.t
t/chart/sub_write_orientation.t
t/chart/sub_write_page_margins.t
t/chart/sub_write_page_setup.t
t/chart/sub_write_plot_vis_only.t
t/chart/sub_write_pt.t
t/chart/sub_write_pt_count.t
t/chart/sub_write_series_formula.t
t/chart/sub_write_style.t
t/chart/sub_write_symbol.t
t/chart/sub_write_tick_lbl_pos.t
t/chart/sub_write_v.t
t/chart/sub_write_xml_declaration.t
t/chartsheet/chartsheet01.t
t/chartsheet/chartsheet_subs.t
t/chartsheet/sub_write_xml_declaration.t
t/drawing/drawing_chart_01.t
t/drawing/drawing_image_01.t
t/drawing/drawing_shape_01.t
t/drawing/drawing_shape_02.t
t/drawing/drawing_shape_03.t
t/drawing/drawing_shape_04.t
t/drawing/drawing_shape_05.t
t/drawing/drawing_shape_06.t
t/drawing/drawing_shape_07.t
t/drawing/drawing_shape_08.t
t/drawing/sub_write_a_graphic_frame_locks.t
t/drawing/sub_write_c_chart.t
t/drawing/sub_write_c_nv_graphic_frame_pr.t
t/drawing/sub_write_c_nv_pr.t
t/drawing/sub_write_col.t
t/drawing/sub_write_col_off.t
t/drawing/sub_write_ext.t
t/drawing/sub_write_pos.t
t/drawing/sub_write_row.t
t/drawing/sub_write_row_off.t
t/drawing/sub_write_xfrm_extension.t
t/drawing/sub_write_xfrm_offset.t
t/drawing/sub_write_xml_declaration.t
t/lib/TestFunctions.pm
t/package/app/app01.t
t/package/app/app02.t
t/package/app/app03.t
t/package/app/sub_write_xml_declaration.t
t/package/comments/comments_01.t
t/package/comments/sub_write_text_t.t
t/package/comments/sub_write_xml_declaration.t
t/package/content_types/content_types.t
t/package/content_types/sub_write_default.t
t/package/content_types/sub_write_override.t
t/package/content_types/sub_write_xml_declaration.t
t/package/core/core01.t
t/package/core/core02.t
t/package/core/sub_write_xml_declaration.t
t/package/relationships/relationships.t
t/package/relationships/sheet_rels.t
t/package/relationships/sub_write_xml_declaration.t
t/package/shared_strings/shared_strings01.t
t/package/shared_strings/shared_strings02.t
t/package/shared_strings/sub_write_si.t
t/package/shared_strings/sub_write_sst.t
t/package/shared_strings/sub_write_xml_declaration.t
t/package/styles/styles_01.t
t/package/styles/styles_02.t
t/package/styles/styles_03.t
t/package/styles/styles_04.t
t/package/styles/styles_05.t
t/package/styles/styles_06.t
t/package/styles/styles_07.t
t/package/styles/styles_08.t
t/package/styles/styles_09.t
t/package/styles/sub_write_border.t
t/package/styles/sub_write_borders.t
t/package/styles/sub_write_cell_style.t
t/package/styles/sub_write_cell_style_xfs.t
t/package/styles/sub_write_cell_styles.t
t/package/styles/sub_write_cell_xfs.t
t/package/styles/sub_write_colors.t
t/package/styles/sub_write_default_fill.t
t/package/styles/sub_write_dxfs.t
t/package/styles/sub_write_fills.t
t/package/styles/sub_write_font.t
t/package/styles/sub_write_fonts.t
t/package/styles/sub_write_mru_colors.t
t/package/styles/sub_write_num_fmt.t
t/package/styles/sub_write_num_fmts.t
t/package/styles/sub_write_style_sheet.t
t/package/styles/sub_write_style_xf.t
t/package/styles/sub_write_xf.t
t/package/styles/sub_write_xml_declaration.t
t/package/table/sub_write_auto_filter.t
t/package/table/sub_write_table_column.t
t/package/table/sub_write_table_style_info.t
t/package/table/sub_write_xml_declaration.t
t/package/table/table01.t
t/package/table/table02.t
t/package/table/table03.t
t/package/table/table04.t
t/package/table/table05.t
t/package/table/table06.t
t/package/table/table07.t
t/package/table/table08.t
t/package/table/table09.t
t/package/table/table10.t
t/package/table/table11.t
t/package/table/table12.t
t/package/vml/sub_write_anchor.t
t/package/vml/sub_write_auto_fill.t
t/package/vml/sub_write_column.t
t/package/vml/sub_write_div.t
t/package/vml/sub_write_fill.t
t/package/vml/sub_write_idmap.t
t/package/vml/sub_write_move_with_cells.t
t/package/vml/sub_write_path.t
t/package/vml/sub_write_row.t
t/package/vml/sub_write_shadow.t
t/package/vml/sub_write_shapelayout.t
t/package/vml/sub_write_shapetype.t
t/package/vml/sub_write_size_with_cells.t
t/package/vml/sub_write_stroke.t
t/package/vml/sub_write_textbox.t
t/package/vml/vml_01.t
t/package/vml/vml_02.t
t/package/vml/vml_03.t
t/package/xml_writer/sub_write_xml_declaration.t
t/regression/array_formula01.t
t/regression/array_formula02.t
t/regression/autofilter00.t
t/regression/autofilter01.t
t/regression/autofilter02.t
t/regression/autofilter03.t
t/regression/autofilter04.t
t/regression/autofilter05.t
t/regression/autofilter06.t
t/regression/autofilter07.t
t/regression/button01.t
t/regression/button02.t
t/regression/button03.t
t/regression/button04.t
t/regression/button05.t
t/regression/button06.t
t/regression/button07.t
t/regression/button08.t
t/regression/button09.t
t/regression/button10.t
t/regression/button11.t
t/regression/button12.t
t/regression/button13.t
t/regression/button14.t
t/regression/chart_area01.t
t/regression/chart_area02.t
t/regression/chart_area03.t
t/regression/chart_area04.t
t/regression/chart_axis01.t
t/regression/chart_axis02.t
t/regression/chart_axis03.t
t/regression/chart_axis04.t
t/regression/chart_axis05.t
t/regression/chart_axis06.t
t/regression/chart_axis07.t
t/regression/chart_axis08.t
t/regression/chart_axis09.t
t/regression/chart_axis10.t
t/regression/chart_axis11.t
t/regression/chart_axis12.t
t/regression/chart_axis13.t
t/regression/chart_axis14.t
t/regression/chart_axis15.t
t/regression/chart_axis16.t
t/regression/chart_axis17.t
t/regression/chart_axis18.t
t/regression/chart_axis19.t
t/regression/chart_axis20.t
t/regression/chart_axis21.t
t/regression/chart_axis22.t
t/regression/chart_axis23.t
t/regression/chart_axis24.t
t/regression/chart_axis25.t
t/regression/chart_axis26.t
t/regression/chart_axis27.t
t/regression/chart_axis28.t
t/regression/chart_axis29.t
t/regression/chart_axis30.t
t/regression/chart_axis31.t
t/regression/chart_axis32.t
t/regression/chart_axis33.t
t/regression/chart_axis34.t
t/regression/chart_axis35.t
t/regression/chart_axis36.t
t/regression/chart_axis37.t
t/regression/chart_axis38.t
t/regression/chart_axis39.t
t/regression/chart_axis40.t
t/regression/chart_axis41.t
t/regression/chart_bar01.t
t/regression/chart_bar02.t
t/regression/chart_bar03.t
t/regression/chart_bar04.t
t/regression/chart_bar05.t
t/regression/chart_bar06.t
t/regression/chart_bar07.t
t/regression/chart_bar08.t
t/regression/chart_bar09.t
t/regression/chart_bar10.t
t/regression/chart_bar11.t
t/regression/chart_bar12.t
t/regression/chart_bar13.t
t/regression/chart_bar14.t
t/regression/chart_bar15.t
t/regression/chart_bar16.t
t/regression/chart_bar17.t
t/regression/chart_bar18.t
t/regression/chart_bar19.t
t/regression/chart_bar20.t
t/regression/chart_bar21.t
t/regression/chart_bar22.t
t/regression/chart_bar23.t
t/regression/chart_bar24.t
t/regression/chart_blank01.t
t/regression/chart_blank02.t
t/regression/chart_blank03.t
t/regression/chart_blank04.t
t/regression/chart_blank05.t
t/regression/chart_blank06.t
t/regression/chart_chartarea01.t
t/regression/chart_chartarea02.t
t/regression/chart_chartarea03.t
t/regression/chart_chartarea04.t
t/regression/chart_chartarea05.t
t/regression/chart_clustered01.t
t/regression/chart_column01.t
t/regression/chart_column02.t
t/regression/chart_column03.t
t/regression/chart_column04.t
t/regression/chart_column05.t
t/regression/chart_column06.t
t/regression/chart_column07.t
t/regression/chart_column08.t
t/regression/chart_column09.t
t/regression/chart_column10.t
t/regression/chart_column11.t
t/regression/chart_column12.t
t/regression/chart_combined01.t
t/regression/chart_combined02.t
t/regression/chart_combined03.t
t/regression/chart_combined04.t
t/regression/chart_combined05.t
t/regression/chart_combined06.t
t/regression/chart_combined07.t
t/regression/chart_combined08.t
t/regression/chart_combined09.t
t/regression/chart_crossing01.t
t/regression/chart_crossing02.t
t/regression/chart_crossing03.t
t/regression/chart_crossing04.t
t/regression/chart_data_labels01.t
t/regression/chart_data_labels02.t
t/regression/chart_data_labels03.t
t/regression/chart_data_labels04.t
t/regression/chart_data_labels05.t
t/regression/chart_data_labels06.t
t/regression/chart_data_labels07.t
t/regression/chart_data_labels08.t
t/regression/chart_data_labels09.t
t/regression/chart_data_labels10.t
t/regression/chart_data_labels11.t
t/regression/chart_data_labels12.t
t/regression/chart_data_labels13.t
t/regression/chart_data_labels14.t
t/regression/chart_data_labels15.t
t/regression/chart_data_labels16.t
t/regression/chart_data_labels17.t
t/regression/chart_data_labels18.t
t/regression/chart_data_labels19.t
t/regression/chart_data_labels20.t
t/regression/chart_data_labels21.t
t/regression/chart_data_labels22.t
t/regression/chart_data_labels23.t
t/regression/chart_data_labels24.t
t/regression/chart_data_labels25.t
t/regression/chart_date01.t
t/regression/chart_date02.t
t/regression/chart_date03.t
t/regression/chart_date04.t
t/regression/chart_date05.t
t/regression/chart_display_units01.t
t/regression/chart_display_units02.t
t/regression/chart_display_units03.t
t/regression/chart_display_units04.t
t/regression/chart_display_units05.t
t/regression/chart_display_units06.t
t/regression/chart_display_units07.t
t/regression/chart_display_units08.t
t/regression/chart_display_units09.t
t/regression/chart_display_units10.t
t/regression/chart_display_units11.t
t/regression/chart_display_units12.t
t/regression/chart_doughnut01.t
t/regression/chart_doughnut02.t
t/regression/chart_doughnut03.t
t/regression/chart_doughnut04.t
t/regression/chart_doughnut05.t
t/regression/chart_doughnut06.t
t/regression/chart_drop_lines01.t
t/regression/chart_drop_lines02.t
t/regression/chart_drop_lines03.t
t/regression/chart_drop_lines04.t
t/regression/chart_errorbars01.t
t/regression/chart_errorbars02.t
t/regression/chart_errorbars03.t
t/regression/chart_errorbars04.t
t/regression/chart_errorbars05.t
t/regression/chart_errorbars06.t
t/regression/chart_errorbars07.t
t/regression/chart_errorbars08.t
t/regression/chart_errorbars09.t
t/regression/chart_errorbars10.t
t/regression/chart_font01.t
t/regression/chart_font02.t
t/regression/chart_font03.t
t/regression/chart_font04.t
t/regression/chart_font05.t
t/regression/chart_font06.t
t/regression/chart_font07.t
t/regression/chart_font08.t
t/regression/chart_font09.t
t/regression/chart_format01.t
t/regression/chart_format02.t
t/regression/chart_format03.t
t/regression/chart_format04.t
t/regression/chart_format05.t
t/regression/chart_format06.t
t/regression/chart_format07.t
t/regression/chart_format08.t
t/regression/chart_format09.t
t/regression/chart_format10.t
t/regression/chart_format11.t
t/regression/chart_format12.t
t/regression/chart_format13.t
t/regression/chart_format14.t
t/regression/chart_format15.t
t/regression/chart_format16.t
t/regression/chart_format17.t
t/regression/chart_format18.t
t/regression/chart_format19.t
t/regression/chart_format20.t
t/regression/chart_format21.t
t/regression/chart_format22.t
t/regression/chart_format23.t
t/regression/chart_format24.t
t/regression/chart_format25.t
t/regression/chart_format26.t
t/regression/chart_format27.t
t/regression/chart_format28.t
t/regression/chart_format29.t
t/regression/chart_format30.t
t/regression/chart_format31.t
t/regression/chart_gap01.t
t/regression/chart_gap02.t
t/regression/chart_gap03.t
t/regression/chart_gap04.t
t/regression/chart_gap05.t
t/regression/chart_gradient01.t
t/regression/chart_gradient02.t
t/regression/chart_gradient03.t
t/regression/chart_gradient04.t
t/regression/chart_gradient05.t
t/regression/chart_gradient06.t
t/regression/chart_gradient07.t
t/regression/chart_gradient08.t
t/regression/chart_gradient09.t
t/regression/chart_gradient10.t
t/regression/chart_gradient11.t
t/regression/chart_gradient12.t
t/regression/chart_gradient13.t
t/regression/chart_gridlines01.t
t/regression/chart_gridlines02.t
t/regression/chart_gridlines03.t
t/regression/chart_gridlines04.t
t/regression/chart_gridlines05.t
t/regression/chart_gridlines06.t
t/regression/chart_gridlines07.t
t/regression/chart_gridlines08.t
t/regression/chart_gridlines09.t
t/regression/chart_high_low_lines01.t
t/regression/chart_high_low_lines02.t
t/regression/chart_layout01.t
t/regression/chart_layout02.t
t/regression/chart_layout03.t
t/regression/chart_layout04.t
t/regression/chart_layout05.t
t/regression/chart_layout06.t
t/regression/chart_layout07.t
t/regression/chart_layout08.t
t/regression/chart_legend01.t
t/regression/chart_legend02.t
t/regression/chart_line01.t
t/regression/chart_line02.t
t/regression/chart_line03.t
t/regression/chart_line04.t
t/regression/chart_name01.t
t/regression/chart_name02.t
t/regression/chart_name03.t
t/regression/chart_order01.t
t/regression/chart_order02.t
t/regression/chart_order03.t
t/regression/chart_pattern01.t
t/regression/chart_pattern02.t
t/regression/chart_pattern03.t
t/regression/chart_pattern04.t
t/regression/chart_pattern05.t
t/regression/chart_pattern06.t
t/regression/chart_pattern07.t
t/regression/chart_pattern08.t
t/regression/chart_pattern09.t
t/regression/chart_pattern10.t
t/regression/chart_pie01.t
t/regression/chart_pie02.t
t/regression/chart_pie03.t
t/regression/chart_pie04.t
t/regression/chart_pie05.t
t/regression/chart_points01.t
t/regression/chart_points02.t
t/regression/chart_points03.t
t/regression/chart_points04.t
t/regression/chart_points05.t
t/regression/chart_points06.t
t/regression/chart_radar01.t
t/regression/chart_radar02.t
t/regression/chart_radar03.t
t/regression/chart_scatter01.t
t/regression/chart_scatter02.t
t/regression/chart_scatter03.t
t/regression/chart_scatter04.t
t/regression/chart_scatter05.t
t/regression/chart_scatter06.t
t/regression/chart_scatter07.t
t/regression/chart_scatter08.t
t/regression/chart_scatter09.t
t/regression/chart_scatter10.t
t/regression/chart_scatter11.t
t/regression/chart_scatter12.t
t/regression/chart_scatter13.t
t/regression/chart_scatter14.t
t/regression/chart_scatter15.t
t/regression/chart_size01.t
t/regression/chart_size02.t
t/regression/chart_size03.t
t/regression/chart_size04.t
t/regression/chart_size05.t
t/regression/chart_sparse01.t
t/regression/chart_stock01.t
t/regression/chart_stock02.t
t/regression/chart_str01.t
t/regression/chart_str02.t
t/regression/chart_table01.t
t/regression/chart_table02.t
t/regression/chart_table03.t
t/regression/chart_title01.t
t/regression/chart_title02.t
t/regression/chart_up_down_bars01.t
t/regression/chart_up_down_bars02.t
t/regression/chart_up_down_bars03.t
t/regression/chartsheet01.t
t/regression/chartsheet02.t
t/regression/chartsheet03.t
t/regression/chartsheet04.t
t/regression/chartsheet05.t
t/regression/chartsheet06.t
t/regression/chartsheet07.t
t/regression/chartsheet08.t
t/regression/chartsheet09.t
t/regression/comment01.t
t/regression/comment02.t
t/regression/comment03.t
t/regression/comment04.t
t/regression/comment05.t
t/regression/comment06.t
t/regression/comment07.t
t/regression/comment08.t
t/regression/comment09.t
t/regression/comment10.t
t/regression/comment11.t
t/regression/comment12.t
t/regression/cond_format01.t
t/regression/cond_format02.t
t/regression/cond_format03.t
t/regression/cond_format04.t
t/regression/cond_format05.t
t/regression/cond_format06.t
t/regression/cond_format07.t
t/regression/cond_format08.t
t/regression/cond_format09.t
t/regression/cond_format10.t
t/regression/cond_format11.t
t/regression/cond_format12.t
t/regression/cond_format13.t
t/regression/cond_format14.t
t/regression/cond_format15.t
t/regression/cond_format16.t
t/regression/cond_format17.t
t/regression/cond_format18.t
t/regression/custom_colors01.t
t/regression/data_validation01.t
t/regression/data_validation02.t
t/regression/data_validation03.t
t/regression/data_validation04.t
t/regression/data_validation05.t
t/regression/data_validation06.t
t/regression/data_validation08.t
t/regression/date_1904_01.t
t/regression/date_1904_02.t
t/regression/date_examples01.t
t/regression/default_format01.t
t/regression/default_row01.t
t/regression/default_row02.t
t/regression/default_row03.t
t/regression/default_row04.t
t/regression/default_row05.t
t/regression/defined_name01.t
t/regression/defined_name02.t
t/regression/defined_name03.t
t/regression/defined_name04.t
t/regression/escapes01.t
t/regression/escapes02.t
t/regression/escapes03.t
t/regression/escapes04.t
t/regression/escapes05.t
t/regression/escapes06.t
t/regression/escapes07.t
t/regression/escapes08.t
t/regression/excel2003_style01.t
t/regression/excel2003_style02.t
t/regression/excel2003_style03.t
t/regression/excel2003_style04.t
t/regression/excel2003_style05.t
t/regression/excel2003_style06.t
t/regression/excel2003_style07.t
t/regression/excel2003_style08.t
t/regression/filehandle01.t
t/regression/firstsheet01.t
t/regression/fit_to_page01.t
t/regression/fit_to_page02.t
t/regression/fit_to_page03.t
t/regression/fit_to_page04.t
t/regression/fit_to_page05.t
t/regression/format01.t
t/regression/format02.t
t/regression/format03.t
t/regression/format04.t
t/regression/format05.t
t/regression/format11.t
t/regression/format12.t
t/regression/format13.t
t/regression/format14.t
t/regression/formula_results01.t
t/regression/gridlines01.t
t/regression/header01.t
t/regression/header02.t
t/regression/header03.t
t/regression/header_image01.t
t/regression/header_image02.t
t/regression/header_image03.t
t/regression/header_image04.t
t/regression/header_image05.t
t/regression/header_image06.t
t/regression/header_image07.t
t/regression/header_image08.t
t/regression/header_image09.t
t/regression/header_image10.t
t/regression/header_image11.t
t/regression/header_image12.t
t/regression/header_image13.t
t/regression/header_image14.t
t/regression/hide01.t
t/regression/hyperlink01.t
t/regression/hyperlink02.t
t/regression/hyperlink03.t
t/regression/hyperlink04.t
t/regression/hyperlink05.t
t/regression/hyperlink06.t
t/regression/hyperlink07.t
t/regression/hyperlink08.t
t/regression/hyperlink09.t
t/regression/hyperlink10.t
t/regression/hyperlink11.t
t/regression/hyperlink12.t
t/regression/hyperlink13.t
t/regression/hyperlink14.t
t/regression/hyperlink15.t
t/regression/hyperlink16.t
t/regression/hyperlink17.t
t/regression/hyperlink18.t
t/regression/hyperlink19.t
t/regression/hyperlink20.t
t/regression/hyperlink21.t
t/regression/hyperlink22.t
t/regression/hyperlink23.t
t/regression/hyperlink24.t
t/regression/hyperlink25.t
t/regression/hyperlink26.t
t/regression/hyperlink27.t
t/regression/image01.t
t/regression/image02.t
t/regression/image03.t
t/regression/image04.t
t/regression/image05.t
t/regression/image06.t
t/regression/image07.t
t/regression/image08.t
t/regression/image09.t
t/regression/image10.t
t/regression/image11.t
t/regression/image12.t
t/regression/image13.t
t/regression/image14.t
t/regression/image15.t
t/regression/image16.t
t/regression/image17.t
t/regression/image18.t
t/regression/image19.t
t/regression/image22.t
t/regression/image23.t
t/regression/image24.t
t/regression/image25.t
t/regression/image26.t
t/regression/image27.t
t/regression/image28.t
t/regression/image29.t
t/regression/image30.t
t/regression/image31.t
t/regression/image32.t
t/regression/image33.t
t/regression/image34.t
t/regression/image35.t
t/regression/images/black_150.jpg
t/regression/images/black_150.png
t/regression/images/black_150e.png
t/regression/images/black_300.jpg
t/regression/images/black_300.png
t/regression/images/black_300e.png
t/regression/images/black_72.jpg
t/regression/images/black_72.png
t/regression/images/black_72e.png
t/regression/images/black_96.jpg
t/regression/images/black_96.png
t/regression/images/blue.jpg
t/regression/images/blue.png
t/regression/images/grey.jpg
t/regression/images/grey.png
t/regression/images/issue32.png
t/regression/images/logo.png
t/regression/images/mylogo.png
t/regression/images/red.bmp
t/regression/images/red.jpg
t/regression/images/red.png
t/regression/images/red_208.png
t/regression/images/red_64x20.png
t/regression/images/red_readonly.png
t/regression/images/train.jpg
t/regression/images/yellow.jpg
t/regression/images/yellow.png
t/regression/images/zero_dpi.jpg
t/regression/landscape01.t
t/regression/macro01.t
t/regression/merge_cells01.t
t/regression/merge_range01.t
t/regression/merge_range02.t
t/regression/merge_range03.t
t/regression/merge_range04.t
t/regression/merge_range05.t
t/regression/optimize01.t
t/regression/optimize02.t
t/regression/optimize03.t
t/regression/optimize04.t
t/regression/optimize05.t
t/regression/optimize06.t
t/regression/optimize07.t
t/regression/optimize08.t
t/regression/outline01.t
t/regression/outline02.t
t/regression/outline03.t
t/regression/outline04.t
t/regression/outline05.t
t/regression/outline06.t
t/regression/page_breaks01.t
t/regression/page_breaks02.t
t/regression/page_breaks03.t
t/regression/page_breaks04.t
t/regression/page_breaks05.t
t/regression/page_breaks06.t
t/regression/page_view01.t
t/regression/panes01.t
t/regression/print_across01.t
t/regression/print_area01.t
t/regression/print_area02.t
t/regression/print_area03.t
t/regression/print_area04.t
t/regression/print_area05.t
t/regression/print_area06.t
t/regression/print_area07.t
t/regression/print_options01.t
t/regression/print_options02.t
t/regression/print_options03.t
t/regression/print_options04.t
t/regression/print_options05.t
t/regression/print_options06.t
t/regression/print_options07.t
t/regression/print_scale01.t
t/regression/print_scale02.t
t/regression/properties01.t
t/regression/properties02.t
t/regression/properties03.t
t/regression/properties04.t
t/regression/properties05.t
t/regression/protect01.t
t/regression/protect02.t
t/regression/protect03.t
t/regression/quote_name01.t
t/regression/quote_name02.t
t/regression/quote_name03.t
t/regression/quote_name04.t
t/regression/repeat01.t
t/regression/repeat02.t
t/regression/repeat03.t
t/regression/repeat04.t
t/regression/repeat05.t
t/regression/rich_string01.t
t/regression/rich_string02.t
t/regression/rich_string03.t
t/regression/rich_string04.t
t/regression/rich_string05.t
t/regression/rich_string06.t
t/regression/rich_string07.t
t/regression/rich_string08.t
t/regression/rich_string09.t
t/regression/rich_string10.t
t/regression/rich_string11.t
t/regression/rich_string12.t
t/regression/row_col_format01.t
t/regression/row_col_format02.t
t/regression/row_col_format03.t
t/regression/row_col_format04.t
t/regression/row_col_format05.t
t/regression/row_col_format06.t
t/regression/row_col_format07.t
t/regression/row_col_format08.t
t/regression/row_col_format09.t
t/regression/row_col_format10.t
t/regression/row_col_format11.t
t/regression/row_col_format12.t
t/regression/row_col_format13.t
t/regression/row_col_format14.t
t/regression/selection01.t
t/regression/selection02.t
t/regression/set_column01.t
t/regression/set_column02.t
t/regression/set_column03.t
t/regression/set_column04.t
t/regression/set_column05.t
t/regression/set_column06.t
t/regression/set_column07.t
t/regression/set_column08.t
t/regression/set_column09.t
t/regression/set_print_scale01.t
t/regression/set_start_page01.t
t/regression/set_start_page02.t
t/regression/set_start_page03.t
t/regression/shape01.t
t/regression/shape02.t
t/regression/shape03.t
t/regression/shape04.t
t/regression/shape_connect01.t
t/regression/shape_connect02.t
t/regression/shape_connect03.t
t/regression/shape_connect04.t
t/regression/shape_scale01.t
t/regression/shape_stencil01.t
t/regression/shared_strings01.t
t/regression/shared_strings02.t
t/regression/simple01.t
t/regression/simple02.t
t/regression/simple03.t
t/regression/simple04.t
t/regression/simple05.t
t/regression/tab_color01.t
t/regression/table01.t
t/regression/table02.t
t/regression/table03.t
t/regression/table04.t
t/regression/table05.t
t/regression/table06.t
t/regression/table07.t
t/regression/table08.t
t/regression/table09.t
t/regression/table10.t
t/regression/table11.t
t/regression/table12.t
t/regression/table13.t
t/regression/table14.t
t/regression/table15.t
t/regression/table16.t
t/regression/table17.t
t/regression/table18.t
t/regression/table19.t
t/regression/table20.t
t/regression/table21.t
t/regression/table22.t
t/regression/taint01.t
t/regression/taint02.t
t/regression/tutorial01.t
t/regression/tutorial02.t
t/regression/tutorial03.t
t/regression/types02.t
t/regression/types08.t
t/regression/utf8_01.t
t/regression/utf8_02.t
t/regression/utf8_03.t
t/regression/utf8_04.t
t/regression/utf8_05.t
t/regression/utf8_06.t
t/regression/utf8_07.t
t/regression/utf8_08.t
t/regression/utf8_09.t
t/regression/utf8_10.t
t/regression/utf8_11.t
t/regression/vml01.t
t/regression/vml02.t
t/regression/vml03.t
t/regression/vml04.t
t/regression/xlsx_files/array_formula01.xlsx
t/regression/xlsx_files/array_formula02.xlsx
t/regression/xlsx_files/autofilter00.xlsx
t/regression/xlsx_files/autofilter01.xlsx
t/regression/xlsx_files/autofilter02.xlsx
t/regression/xlsx_files/autofilter03.xlsx
t/regression/xlsx_files/autofilter04.xlsx
t/regression/xlsx_files/autofilter05.xlsx
t/regression/xlsx_files/autofilter06.xlsx
t/regression/xlsx_files/autofilter07.xlsx
t/regression/xlsx_files/button01.xlsx
t/regression/xlsx_files/button02.xlsx
t/regression/xlsx_files/button03.xlsx
t/regression/xlsx_files/button04.xlsx
t/regression/xlsx_files/button05.xlsx
t/regression/xlsx_files/button07.xlsm
t/regression/xlsx_files/button08.xlsx
t/regression/xlsx_files/button09.xlsx
t/regression/xlsx_files/button10.xlsx
t/regression/xlsx_files/button11.xlsx
t/regression/xlsx_files/button12.xlsx
t/regression/xlsx_files/chart_area01.xlsx
t/regression/xlsx_files/chart_area02.xlsx
t/regression/xlsx_files/chart_area03.xlsx
t/regression/xlsx_files/chart_area04.xlsx
t/regression/xlsx_files/chart_axis01.xlsx
t/regression/xlsx_files/chart_axis02.xlsx
t/regression/xlsx_files/chart_axis03.xlsx
t/regression/xlsx_files/chart_axis04.xlsx
t/regression/xlsx_files/chart_axis05.xlsx
t/regression/xlsx_files/chart_axis06.xlsx
t/regression/xlsx_files/chart_axis07.xlsx
t/regression/xlsx_files/chart_axis08.xlsx
t/regression/xlsx_files/chart_axis09.xlsx
t/regression/xlsx_files/chart_axis10.xlsx
t/regression/xlsx_files/chart_axis11.xlsx
t/regression/xlsx_files/chart_axis12.xlsx
t/regression/xlsx_files/chart_axis13.xlsx
t/regression/xlsx_files/chart_axis14.xlsx
t/regression/xlsx_files/chart_axis15.xlsx
t/regression/xlsx_files/chart_axis16.xlsx
t/regression/xlsx_files/chart_axis17.xlsx
t/regression/xlsx_files/chart_axis18.xlsx
t/regression/xlsx_files/chart_axis19.xlsx
t/regression/xlsx_files/chart_axis20.xlsx
t/regression/xlsx_files/chart_axis21.xlsx
t/regression/xlsx_files/chart_axis22.xlsx
t/regression/xlsx_files/chart_axis23.xlsx
t/regression/xlsx_files/chart_axis24.xlsx
t/regression/xlsx_files/chart_axis25.xlsx
t/regression/xlsx_files/chart_axis26.xlsx
t/regression/xlsx_files/chart_axis27.xlsx
t/regression/xlsx_files/chart_axis28.xlsx
t/regression/xlsx_files/chart_axis29.xlsx
t/regression/xlsx_files/chart_axis30.xlsx
t/regression/xlsx_files/chart_axis31.xlsx
t/regression/xlsx_files/chart_axis32.xlsx
t/regression/xlsx_files/chart_axis33.xlsx
t/regression/xlsx_files/chart_axis34.xlsx
t/regression/xlsx_files/chart_axis35.xlsx
t/regression/xlsx_files/chart_axis36.xlsx
t/regression/xlsx_files/chart_axis37.xlsx
t/regression/xlsx_files/chart_axis38.xlsx
t/regression/xlsx_files/chart_axis39.xlsx
t/regression/xlsx_files/chart_axis40.xlsx
t/regression/xlsx_files/chart_axis41.xlsx
t/regression/xlsx_files/chart_bar01.xlsx
t/regression/xlsx_files/chart_bar02.xlsx
t/regression/xlsx_files/chart_bar03.xlsx
t/regression/xlsx_files/chart_bar04.xlsx
t/regression/xlsx_files/chart_bar05.xlsx
t/regression/xlsx_files/chart_bar06.xlsx
t/regression/xlsx_files/chart_bar07.xlsx
t/regression/xlsx_files/chart_bar08.xlsx
t/regression/xlsx_files/chart_bar09.xlsx
t/regression/xlsx_files/chart_bar10.xlsx
t/regression/xlsx_files/chart_bar11.xlsx
t/regression/xlsx_files/chart_bar12.xlsx
t/regression/xlsx_files/chart_bar13.xlsx
t/regression/xlsx_files/chart_bar14.xlsx
t/regression/xlsx_files/chart_bar15.xlsx
t/regression/xlsx_files/chart_bar16.xlsx
t/regression/xlsx_files/chart_bar17.xlsx
t/regression/xlsx_files/chart_bar18.xlsx
t/regression/xlsx_files/chart_bar19.xlsx
t/regression/xlsx_files/chart_bar20.xlsx
t/regression/xlsx_files/chart_bar21.xlsx
t/regression/xlsx_files/chart_bar22.xlsx
t/regression/xlsx_files/chart_bar23.xlsx
t/regression/xlsx_files/chart_bar24.xlsx
t/regression/xlsx_files/chart_blank01.xlsx
t/regression/xlsx_files/chart_blank02.xlsx
t/regression/xlsx_files/chart_blank03.xlsx
t/regression/xlsx_files/chart_blank04.xlsx
t/regression/xlsx_files/chart_blank05.xlsx
t/regression/xlsx_files/chart_blank06.xlsx
t/regression/xlsx_files/chart_chartarea01.xlsx
t/regression/xlsx_files/chart_chartarea03.xlsx
t/regression/xlsx_files/chart_chartarea04.xlsx
t/regression/xlsx_files/chart_chartarea05.xlsx
t/regression/xlsx_files/chart_clustered01.xlsx
t/regression/xlsx_files/chart_column01.xlsx
t/regression/xlsx_files/chart_column02.xlsx
t/regression/xlsx_files/chart_column03.xlsx
t/regression/xlsx_files/chart_column04.xlsx
t/regression/xlsx_files/chart_column05.xlsx
t/regression/xlsx_files/chart_column06.xlsx
t/regression/xlsx_files/chart_column07.xlsx
t/regression/xlsx_files/chart_column08.xlsx
t/regression/xlsx_files/chart_column09.xlsx
t/regression/xlsx_files/chart_column10.xlsx
t/regression/xlsx_files/chart_column11.xlsx
t/regression/xlsx_files/chart_column12.xlsx
t/regression/xlsx_files/chart_combined01.xlsx
t/regression/xlsx_files/chart_combined02.xlsx
t/regression/xlsx_files/chart_combined03.xlsx
t/regression/xlsx_files/chart_combined04.xlsx
t/regression/xlsx_files/chart_combined05.xlsx
t/regression/xlsx_files/chart_combined06.xlsx
t/regression/xlsx_files/chart_combined07.xlsx
t/regression/xlsx_files/chart_combined08.xlsx
t/regression/xlsx_files/chart_combined09.xlsx
t/regression/xlsx_files/chart_crossing01.xlsx
t/regression/xlsx_files/chart_crossing02.xlsx
t/regression/xlsx_files/chart_crossing03.xlsx
t/regression/xlsx_files/chart_crossing04.xlsx
t/regression/xlsx_files/chart_data_labels01.xlsx
t/regression/xlsx_files/chart_data_labels02.xlsx
t/regression/xlsx_files/chart_data_labels03.xlsx
t/regression/xlsx_files/chart_data_labels04.xlsx
t/regression/xlsx_files/chart_data_labels05.xlsx
t/regression/xlsx_files/chart_data_labels06.xlsx
t/regression/xlsx_files/chart_data_labels07.xlsx
t/regression/xlsx_files/chart_data_labels08.xlsx
t/regression/xlsx_files/chart_data_labels09.xlsx
t/regression/xlsx_files/chart_data_labels10.xlsx
t/regression/xlsx_files/chart_data_labels11.xlsx
t/regression/xlsx_files/chart_data_labels12.xlsx
t/regression/xlsx_files/chart_data_labels13.xlsx
t/regression/xlsx_files/chart_data_labels14.xlsx
t/regression/xlsx_files/chart_data_labels15.xlsx
t/regression/xlsx_files/chart_data_labels16.xlsx
t/regression/xlsx_files/chart_data_labels17.xlsx
t/regression/xlsx_files/chart_data_labels18.xlsx
t/regression/xlsx_files/chart_data_labels19.xlsx
t/regression/xlsx_files/chart_data_labels20.xlsx
t/regression/xlsx_files/chart_data_labels21.xlsx
t/regression/xlsx_files/chart_data_labels22.xlsx
t/regression/xlsx_files/chart_data_labels23.xlsx
t/regression/xlsx_files/chart_data_labels24.xlsx
t/regression/xlsx_files/chart_data_labels25.xlsx
t/regression/xlsx_files/chart_date01.xlsx
t/regression/xlsx_files/chart_date02.xlsx
t/regression/xlsx_files/chart_date03.xlsx
t/regression/xlsx_files/chart_date04.xlsx
t/regression/xlsx_files/chart_date05.xlsx
t/regression/xlsx_files/chart_display_units01.xlsx
t/regression/xlsx_files/chart_display_units02.xlsx
t/regression/xlsx_files/chart_display_units03.xlsx
t/regression/xlsx_files/chart_display_units04.xlsx
t/regression/xlsx_files/chart_display_units05.xlsx
t/regression/xlsx_files/chart_display_units06.xlsx
t/regression/xlsx_files/chart_display_units07.xlsx
t/regression/xlsx_files/chart_display_units08.xlsx
t/regression/xlsx_files/chart_display_units09.xlsx
t/regression/xlsx_files/chart_display_units10.xlsx
t/regression/xlsx_files/chart_display_units11.xlsx
t/regression/xlsx_files/chart_display_units12.xlsx
t/regression/xlsx_files/chart_doughnut01.xlsx
t/regression/xlsx_files/chart_doughnut02.xlsx
t/regression/xlsx_files/chart_doughnut03.xlsx
t/regression/xlsx_files/chart_doughnut04.xlsx
t/regression/xlsx_files/chart_doughnut05.xlsx
t/regression/xlsx_files/chart_doughnut06.xlsx
t/regression/xlsx_files/chart_drop_lines01.xlsx
t/regression/xlsx_files/chart_drop_lines02.xlsx
t/regression/xlsx_files/chart_drop_lines03.xlsx
t/regression/xlsx_files/chart_drop_lines04.xlsx
t/regression/xlsx_files/chart_errorbars01.xlsx
t/regression/xlsx_files/chart_errorbars02.xlsx
t/regression/xlsx_files/chart_errorbars03.xlsx
t/regression/xlsx_files/chart_errorbars04.xlsx
t/regression/xlsx_files/chart_errorbars05.xlsx
t/regression/xlsx_files/chart_errorbars06.xlsx
t/regression/xlsx_files/chart_errorbars07.xlsx
t/regression/xlsx_files/chart_errorbars08.xlsx
t/regression/xlsx_files/chart_errorbars09.xlsx
t/regression/xlsx_files/chart_errorbars10.xlsx
t/regression/xlsx_files/chart_font01.xlsx
t/regression/xlsx_files/chart_font02.xlsx
t/regression/xlsx_files/chart_font03.xlsx
t/regression/xlsx_files/chart_font04.xlsx
t/regression/xlsx_files/chart_font05.xlsx
t/regression/xlsx_files/chart_font06.xlsx
t/regression/xlsx_files/chart_font07.xlsx
t/regression/xlsx_files/chart_font08.xlsx
t/regression/xlsx_files/chart_font09.xlsx
t/regression/xlsx_files/chart_format01.xlsx
t/regression/xlsx_files/chart_format02.xlsx
t/regression/xlsx_files/chart_format03.xlsx
t/regression/xlsx_files/chart_format04.xlsx
t/regression/xlsx_files/chart_format05.xlsx
t/regression/xlsx_files/chart_format06.xlsx
t/regression/xlsx_files/chart_format07.xlsx
t/regression/xlsx_files/chart_format08.xlsx
t/regression/xlsx_files/chart_format09.xlsx
t/regression/xlsx_files/chart_format10.xlsx
t/regression/xlsx_files/chart_format11.xlsx
t/regression/xlsx_files/chart_format12.xlsx
t/regression/xlsx_files/chart_format13.xlsx
t/regression/xlsx_files/chart_format14.xlsx
t/regression/xlsx_files/chart_format15.xlsx
t/regression/xlsx_files/chart_format16.xlsx
t/regression/xlsx_files/chart_format17.xlsx
t/regression/xlsx_files/chart_format18.xlsx
t/regression/xlsx_files/chart_format19.xlsx
t/regression/xlsx_files/chart_format20.xlsx
t/regression/xlsx_files/chart_format21.xlsx
t/regression/xlsx_files/chart_format22.xlsx
t/regression/xlsx_files/chart_format23.xlsx
t/regression/xlsx_files/chart_format24.xlsx
t/regression/xlsx_files/chart_format25.xlsx
t/regression/xlsx_files/chart_format26.xlsx
t/regression/xlsx_files/chart_format27.xlsx
t/regression/xlsx_files/chart_format28.xlsx
t/regression/xlsx_files/chart_format29.xlsx
t/regression/xlsx_files/chart_format30.xlsx
t/regression/xlsx_files/chart_format31.xlsx
t/regression/xlsx_files/chart_gap01.xlsx
t/regression/xlsx_files/chart_gap02.xlsx
t/regression/xlsx_files/chart_gap03.xlsx
t/regression/xlsx_files/chart_gap04.xlsx
t/regression/xlsx_files/chart_gap05.xlsx
t/regression/xlsx_files/chart_gradient01.xlsx
t/regression/xlsx_files/chart_gradient02.xlsx
t/regression/xlsx_files/chart_gradient03.xlsx
t/regression/xlsx_files/chart_gradient04.xlsx
t/regression/xlsx_files/chart_gradient05.xlsx
t/regression/xlsx_files/chart_gradient06.xlsx
t/regression/xlsx_files/chart_gradient07.xlsx
t/regression/xlsx_files/chart_gradient08.xlsx
t/regression/xlsx_files/chart_gradient09.xlsx
t/regression/xlsx_files/chart_gradient10.xlsx
t/regression/xlsx_files/chart_gradient11.xlsx
t/regression/xlsx_files/chart_gradient12.xlsx
t/regression/xlsx_files/chart_gradient13.xlsx
t/regression/xlsx_files/chart_gridlines01.xlsx
t/regression/xlsx_files/chart_gridlines02.xlsx
t/regression/xlsx_files/chart_gridlines03.xlsx
t/regression/xlsx_files/chart_gridlines04.xlsx
t/regression/xlsx_files/chart_gridlines05.xlsx
t/regression/xlsx_files/chart_gridlines06.xlsx
t/regression/xlsx_files/chart_gridlines07.xlsx
t/regression/xlsx_files/chart_gridlines08.xlsx
t/regression/xlsx_files/chart_gridlines09.xlsx
t/regression/xlsx_files/chart_high_low_lines01.xlsx
t/regression/xlsx_files/chart_high_low_lines02.xlsx
t/regression/xlsx_files/chart_layout01.xlsx
t/regression/xlsx_files/chart_layout02.xlsx
t/regression/xlsx_files/chart_layout03.xlsx
t/regression/xlsx_files/chart_layout04.xlsx
t/regression/xlsx_files/chart_layout05.xlsx
t/regression/xlsx_files/chart_layout06.xlsx
t/regression/xlsx_files/chart_layout07.xlsx
t/regression/xlsx_files/chart_layout08.xlsx
t/regression/xlsx_files/chart_legend01.xlsx
t/regression/xlsx_files/chart_line01.xlsx
t/regression/xlsx_files/chart_line02.xlsx
t/regression/xlsx_files/chart_line03.xlsx
t/regression/xlsx_files/chart_line04.xlsx
t/regression/xlsx_files/chart_name01.xlsx
t/regression/xlsx_files/chart_name02.xlsx
t/regression/xlsx_files/chart_name03.xlsx
t/regression/xlsx_files/chart_order01.xlsx
t/regression/xlsx_files/chart_order03.xlsx
t/regression/xlsx_files/chart_pattern01.xlsx
t/regression/xlsx_files/chart_pattern02.xlsx
t/regression/xlsx_files/chart_pattern03.xlsx
t/regression/xlsx_files/chart_pattern04.xlsx
t/regression/xlsx_files/chart_pattern05.xlsx
t/regression/xlsx_files/chart_pattern06.xlsx
t/regression/xlsx_files/chart_pattern07.xlsx
t/regression/xlsx_files/chart_pattern08.xlsx
t/regression/xlsx_files/chart_pattern09.xlsx
t/regression/xlsx_files/chart_pattern10.xlsx
t/regression/xlsx_files/chart_pie01.xlsx
t/regression/xlsx_files/chart_pie02.xlsx
t/regression/xlsx_files/chart_pie03.xlsx
t/regression/xlsx_files/chart_pie04.xlsx
t/regression/xlsx_files/chart_pie05.xlsx
t/regression/xlsx_files/chart_points01.xlsx
t/regression/xlsx_files/chart_points02.xlsx
t/regression/xlsx_files/chart_points03.xlsx
t/regression/xlsx_files/chart_points04.xlsx
t/regression/xlsx_files/chart_points05.xlsx
t/regression/xlsx_files/chart_points06.xlsx
t/regression/xlsx_files/chart_radar01.xlsx
t/regression/xlsx_files/chart_radar02.xlsx
t/regression/xlsx_files/chart_radar03.xlsx
t/regression/xlsx_files/chart_scatter01.xlsx
t/regression/xlsx_files/chart_scatter02.xlsx
t/regression/xlsx_files/chart_scatter03.xlsx
t/regression/xlsx_files/chart_scatter04.xlsx
t/regression/xlsx_files/chart_scatter05.xlsx
t/regression/xlsx_files/chart_scatter06.xlsx
t/regression/xlsx_files/chart_scatter07.xlsx
t/regression/xlsx_files/chart_scatter08.xlsx
t/regression/xlsx_files/chart_scatter09.xlsx
t/regression/xlsx_files/chart_scatter10.xlsx
t/regression/xlsx_files/chart_scatter11.xlsx
t/regression/xlsx_files/chart_scatter12.xlsx
t/regression/xlsx_files/chart_scatter14.xlsx
t/regression/xlsx_files/chart_scatter15.xlsx
t/regression/xlsx_files/chart_size01.xlsx
t/regression/xlsx_files/chart_size04.xlsx
t/regression/xlsx_files/chart_sparse01.xlsx
t/regression/xlsx_files/chart_stock01.xlsx
t/regression/xlsx_files/chart_stock02.xlsx
t/regression/xlsx_files/chart_str01.xlsx
t/regression/xlsx_files/chart_str02.xlsx
t/regression/xlsx_files/chart_table01.xlsx
t/regression/xlsx_files/chart_table02.xlsx
t/regression/xlsx_files/chart_table03.xlsx
t/regression/xlsx_files/chart_title01.xlsx
t/regression/xlsx_files/chart_title02.xlsx
t/regression/xlsx_files/chart_up_down_bars01.xlsx
t/regression/xlsx_files/chart_up_down_bars02.xlsx
t/regression/xlsx_files/chart_up_down_bars03.xlsx
t/regression/xlsx_files/chartsheet01.xlsx
t/regression/xlsx_files/chartsheet02.xlsx
t/regression/xlsx_files/chartsheet03.xlsx
t/regression/xlsx_files/chartsheet04.xlsx
t/regression/xlsx_files/chartsheet05.xlsx
t/regression/xlsx_files/chartsheet06.xlsx
t/regression/xlsx_files/chartsheet07.xlsx
t/regression/xlsx_files/chartsheet08.xlsx
t/regression/xlsx_files/chartsheet09.xlsx
t/regression/xlsx_files/comment01.xlsx
t/regression/xlsx_files/comment02.xlsx
t/regression/xlsx_files/comment03.xlsx
t/regression/xlsx_files/comment04.xlsx
t/regression/xlsx_files/comment05.xlsx
t/regression/xlsx_files/comment06.xlsx
t/regression/xlsx_files/comment07.xlsx
t/regression/xlsx_files/comment08.xlsx
t/regression/xlsx_files/comment09.xlsx
t/regression/xlsx_files/comment10.xlsx
t/regression/xlsx_files/comment11.xlsx
t/regression/xlsx_files/comment12.xlsx
t/regression/xlsx_files/cond_format01.xlsx
t/regression/xlsx_files/cond_format02.xlsx
t/regression/xlsx_files/cond_format03.xlsx
t/regression/xlsx_files/cond_format04.xlsx
t/regression/xlsx_files/cond_format05.xlsx
t/regression/xlsx_files/cond_format06.xlsx
t/regression/xlsx_files/cond_format07.xlsx
t/regression/xlsx_files/cond_format08.xlsx
t/regression/xlsx_files/cond_format10.xlsx
t/regression/xlsx_files/cond_format11.xlsx
t/regression/xlsx_files/cond_format12.xlsx
t/regression/xlsx_files/cond_format13.xlsx
t/regression/xlsx_files/cond_format14.xlsx
t/regression/xlsx_files/cond_format15.xlsx
t/regression/xlsx_files/cond_format16.xlsx
t/regression/xlsx_files/cond_format17.xlsx
t/regression/xlsx_files/cond_format18.xlsx
t/regression/xlsx_files/custom_colors01.xlsx
t/regression/xlsx_files/data_validation01.xlsx
t/regression/xlsx_files/data_validation02.xlsx
t/regression/xlsx_files/data_validation03.xlsx
t/regression/xlsx_files/data_validation08.xlsx
t/regression/xlsx_files/date_1904_01.xlsx
t/regression/xlsx_files/date_1904_02.xlsx
t/regression/xlsx_files/date_examples01.xlsx
t/regression/xlsx_files/default_format01.xlsx
t/regression/xlsx_files/default_row01.xlsx
t/regression/xlsx_files/default_row02.xlsx
t/regression/xlsx_files/default_row03.xlsx
t/regression/xlsx_files/default_row04.xlsx
t/regression/xlsx_files/default_row05.xlsx
t/regression/xlsx_files/defined_name01.xlsx
t/regression/xlsx_files/defined_name02.xlsx
t/regression/xlsx_files/defined_name03.xlsx
t/regression/xlsx_files/defined_name04.xlsx
t/regression/xlsx_files/escapes01.xlsx
t/regression/xlsx_files/escapes02.xlsx
t/regression/xlsx_files/escapes03.xlsx
t/regression/xlsx_files/escapes04.xlsx
t/regression/xlsx_files/escapes05.xlsx
t/regression/xlsx_files/escapes06.xlsx
t/regression/xlsx_files/escapes07.xlsx
t/regression/xlsx_files/escapes08.xlsx
t/regression/xlsx_files/excel2003_style01.xlsx
t/regression/xlsx_files/excel2003_style02.xlsx
t/regression/xlsx_files/excel2003_style03.xlsx
t/regression/xlsx_files/excel2003_style04.xlsx
t/regression/xlsx_files/excel2003_style05.xlsx
t/regression/xlsx_files/excel2003_style06.xlsx
t/regression/xlsx_files/excel2003_style07.xlsx
t/regression/xlsx_files/excel2003_style08.xlsx
t/regression/xlsx_files/filehandle01.xlsx
t/regression/xlsx_files/firstsheet01.xlsx
t/regression/xlsx_files/fit_to_pages01.xlsx
t/regression/xlsx_files/fit_to_pages02.xlsx
t/regression/xlsx_files/fit_to_pages03.xlsx
t/regression/xlsx_files/fit_to_pages04.xlsx
t/regression/xlsx_files/fit_to_pages05.xlsx
t/regression/xlsx_files/format01.xlsx
t/regression/xlsx_files/format02.xlsx
t/regression/xlsx_files/format03.xlsx
t/regression/xlsx_files/format04.xlsx
t/regression/xlsx_files/format05.xlsx
t/regression/xlsx_files/format11.xlsx
t/regression/xlsx_files/format12.xlsx
t/regression/xlsx_files/format13.xlsx
t/regression/xlsx_files/format14.xlsx
t/regression/xlsx_files/formula_results01.xlsx
t/regression/xlsx_files/gridlines01.xlsx
t/regression/xlsx_files/header01.xlsx
t/regression/xlsx_files/header02.xlsx
t/regression/xlsx_files/header03.xlsx
t/regression/xlsx_files/header_image01.xlsx
t/regression/xlsx_files/header_image02.xlsx
t/regression/xlsx_files/header_image03.xlsx
t/regression/xlsx_files/header_image04.xlsx
t/regression/xlsx_files/header_image05.xlsx
t/regression/xlsx_files/header_image06.xlsx
t/regression/xlsx_files/header_image07.xlsx
t/regression/xlsx_files/header_image08.xlsx
t/regression/xlsx_files/header_image09.xlsx
t/regression/xlsx_files/header_image10.xlsx
t/regression/xlsx_files/header_image11.xlsx
t/regression/xlsx_files/header_image12.xlsx
t/regression/xlsx_files/header_image13.xlsx
t/regression/xlsx_files/header_image14.xlsx
t/regression/xlsx_files/hide01.xlsx
t/regression/xlsx_files/hyperlink01.xlsx
t/regression/xlsx_files/hyperlink02.xlsx
t/regression/xlsx_files/hyperlink03.xlsx
t/regression/xlsx_files/hyperlink04.xlsx
t/regression/xlsx_files/hyperlink05.xlsx
t/regression/xlsx_files/hyperlink06.xlsx
t/regression/xlsx_files/hyperlink07.xlsx
t/regression/xlsx_files/hyperlink08.xlsx
t/regression/xlsx_files/hyperlink09.xlsx
t/regression/xlsx_files/hyperlink10.xlsx
t/regression/xlsx_files/hyperlink11.xlsx
t/regression/xlsx_files/hyperlink12.xlsx
t/regression/xlsx_files/hyperlink13.xlsx
t/regression/xlsx_files/hyperlink14.xlsx
t/regression/xlsx_files/hyperlink15.xlsx
t/regression/xlsx_files/hyperlink16.xlsx
t/regression/xlsx_files/hyperlink17.xlsx
t/regression/xlsx_files/hyperlink18.xlsx
t/regression/xlsx_files/hyperlink19.xlsx
t/regression/xlsx_files/hyperlink20.xlsx
t/regression/xlsx_files/hyperlink21.xlsx
t/regression/xlsx_files/hyperlink22.xlsx
t/regression/xlsx_files/hyperlink23.xlsx
t/regression/xlsx_files/hyperlink24.xlsx
t/regression/xlsx_files/hyperlink25.xlsx
t/regression/xlsx_files/hyperlink26.xlsx
t/regression/xlsx_files/hyperlink27.xlsx
t/regression/xlsx_files/image01.xlsx
t/regression/xlsx_files/image02.xlsx
t/regression/xlsx_files/image03.xlsx
t/regression/xlsx_files/image04.xlsx
t/regression/xlsx_files/image05.xlsx
t/regression/xlsx_files/image06.xlsx
t/regression/xlsx_files/image07.xlsx
t/regression/xlsx_files/image08.xlsx
t/regression/xlsx_files/image09.xlsx
t/regression/xlsx_files/image10.xlsx
t/regression/xlsx_files/image11.xlsx
t/regression/xlsx_files/image12.xlsx
t/regression/xlsx_files/image13.xlsx
t/regression/xlsx_files/image14.xlsx
t/regression/xlsx_files/image15.xlsx
t/regression/xlsx_files/image16.xlsx
t/regression/xlsx_files/image17.xlsx
t/regression/xlsx_files/image18.xlsx
t/regression/xlsx_files/image19.xlsx
t/regression/xlsx_files/image22.xlsx
t/regression/xlsx_files/image23.xlsx
t/regression/xlsx_files/image24.xlsx
t/regression/xlsx_files/image25.xlsx
t/regression/xlsx_files/image26.xlsx
t/regression/xlsx_files/image27.xlsx
t/regression/xlsx_files/image28.xlsx
t/regression/xlsx_files/image29.xlsx
t/regression/xlsx_files/image30.xlsx
t/regression/xlsx_files/image31.xlsx
t/regression/xlsx_files/image32.xlsx
t/regression/xlsx_files/image33.xlsx
t/regression/xlsx_files/image34.xlsx
t/regression/xlsx_files/image35.xlsx
t/regression/xlsx_files/landscape01.xlsx
t/regression/xlsx_files/macro01.xlsm
t/regression/xlsx_files/merge_cells01.xlsx
t/regression/xlsx_files/merge_range01.xlsx
t/regression/xlsx_files/merge_range02.xlsx
t/regression/xlsx_files/merge_range03.xlsx
t/regression/xlsx_files/merge_range04.xlsx
t/regression/xlsx_files/merge_range05.xlsx
t/regression/xlsx_files/optimize01.xlsx
t/regression/xlsx_files/optimize02.xlsx
t/regression/xlsx_files/optimize03.xlsx
t/regression/xlsx_files/optimize04.xlsx
t/regression/xlsx_files/optimize05.xlsx
t/regression/xlsx_files/optimize06.xlsx
t/regression/xlsx_files/optimize07.xlsx
t/regression/xlsx_files/optimize08.xlsx
t/regression/xlsx_files/outline01.xlsx
t/regression/xlsx_files/outline02.xlsx
t/regression/xlsx_files/outline03.xlsx
t/regression/xlsx_files/outline04.xlsx
t/regression/xlsx_files/outline05.xlsx
t/regression/xlsx_files/outline06.xlsx
t/regression/xlsx_files/page_breaks01.xlsx
t/regression/xlsx_files/page_breaks02.xlsx
t/regression/xlsx_files/page_breaks03.xlsx
t/regression/xlsx_files/page_breaks04.xlsx
t/regression/xlsx_files/page_breaks05.xlsx
t/regression/xlsx_files/page_breaks06.xlsx
t/regression/xlsx_files/page_view01.xlsx
t/regression/xlsx_files/panes01.xlsx
t/regression/xlsx_files/print_across01.xlsx
t/regression/xlsx_files/print_area01.xlsx
t/regression/xlsx_files/print_area02.xlsx
t/regression/xlsx_files/print_area03.xlsx
t/regression/xlsx_files/print_area04.xlsx
t/regression/xlsx_files/print_area05.xlsx
t/regression/xlsx_files/print_area06.xlsx
t/regression/xlsx_files/print_area07.xlsx
t/regression/xlsx_files/print_options01.xlsx
t/regression/xlsx_files/print_options02.xlsx
t/regression/xlsx_files/print_options03.xlsx
t/regression/xlsx_files/print_options04.xlsx
t/regression/xlsx_files/print_options05.xlsx
t/regression/xlsx_files/print_options06.xlsx
t/regression/xlsx_files/print_options07.xlsx
t/regression/xlsx_files/print_scale01.xlsx
t/regression/xlsx_files/print_scale02.xlsx
t/regression/xlsx_files/properties01.xlsx
t/regression/xlsx_files/properties02.xlsx
t/regression/xlsx_files/properties03.xlsx
t/regression/xlsx_files/properties04.xlsx
t/regression/xlsx_files/properties05.xlsx
t/regression/xlsx_files/protect01.xlsx
t/regression/xlsx_files/protect02.xlsx
t/regression/xlsx_files/protect03.xlsx
t/regression/xlsx_files/quote_name01.xlsx
t/regression/xlsx_files/quote_name02.xlsx
t/regression/xlsx_files/quote_name03.xlsx
t/regression/xlsx_files/quote_name04.xlsx
t/regression/xlsx_files/repeat01.xlsx
t/regression/xlsx_files/repeat02.xlsx
t/regression/xlsx_files/repeat03.xlsx
t/regression/xlsx_files/repeat04.xlsx
t/regression/xlsx_files/repeat05.xlsx
t/regression/xlsx_files/rich_string01.xlsx
t/regression/xlsx_files/rich_string02.xlsx
t/regression/xlsx_files/rich_string03.xlsx
t/regression/xlsx_files/rich_string04.xlsx
t/regression/xlsx_files/rich_string05.xlsx
t/regression/xlsx_files/rich_string06.xlsx
t/regression/xlsx_files/rich_string07.xlsx
t/regression/xlsx_files/rich_string08.xlsx
t/regression/xlsx_files/rich_string09.xlsx
t/regression/xlsx_files/rich_string10.xlsx
t/regression/xlsx_files/rich_string11.xlsx
t/regression/xlsx_files/rich_string12.xlsx
t/regression/xlsx_files/row_col_format01.xlsx
t/regression/xlsx_files/row_col_format02.xlsx
t/regression/xlsx_files/row_col_format03.xlsx
t/regression/xlsx_files/row_col_format04.xlsx
t/regression/xlsx_files/row_col_format05.xlsx
t/regression/xlsx_files/row_col_format06.xlsx
t/regression/xlsx_files/row_col_format07.xlsx
t/regression/xlsx_files/row_col_format08.xlsx
t/regression/xlsx_files/row_col_format09.xlsx
t/regression/xlsx_files/row_col_format10.xlsx
t/regression/xlsx_files/row_col_format11.xlsx
t/regression/xlsx_files/row_col_format12.xlsx
t/regression/xlsx_files/row_col_format13.xlsx
t/regression/xlsx_files/row_col_format14.xlsx
t/regression/xlsx_files/selection01.xlsx
t/regression/xlsx_files/selection02.xlsx
t/regression/xlsx_files/set_column01.xlsx
t/regression/xlsx_files/set_column03.xlsx
t/regression/xlsx_files/set_column04.xlsx
t/regression/xlsx_files/set_column05.xlsx
t/regression/xlsx_files/set_column06.xlsx
t/regression/xlsx_files/set_column07.xlsx
t/regression/xlsx_files/set_column08.xlsx
t/regression/xlsx_files/set_column09.xlsx
t/regression/xlsx_files/set_print_scale01.xlsx
t/regression/xlsx_files/set_start_page01.xlsx
t/regression/xlsx_files/set_start_page02.xlsx
t/regression/xlsx_files/set_start_page03.xlsx
t/regression/xlsx_files/shape01.xlsx
t/regression/xlsx_files/shape02.xlsx
t/regression/xlsx_files/shape03.xlsx
t/regression/xlsx_files/shape04.xlsx
t/regression/xlsx_files/shape_connect01.xlsx
t/regression/xlsx_files/shape_connect02.xlsx
t/regression/xlsx_files/shape_connect03.xlsx
t/regression/xlsx_files/shape_connect04.xlsx
t/regression/xlsx_files/shape_scale01.xlsx
t/regression/xlsx_files/shape_stencil01.xlsx
t/regression/xlsx_files/shared_strings01.xlsx
t/regression/xlsx_files/shared_strings02.xlsx
t/regression/xlsx_files/simple01.xlsx
t/regression/xlsx_files/simple02.xlsx
t/regression/xlsx_files/simple03.xlsx
t/regression/xlsx_files/simple04.xlsx
t/regression/xlsx_files/simple05.xlsx
t/regression/xlsx_files/tab_color01.xlsx
t/regression/xlsx_files/table01.xlsx
t/regression/xlsx_files/table02.xlsx
t/regression/xlsx_files/table03.xlsx
t/regression/xlsx_files/table04.xlsx
t/regression/xlsx_files/table05.xlsx
t/regression/xlsx_files/table06.xlsx
t/regression/xlsx_files/table07.xlsx
t/regression/xlsx_files/table08.xlsx
t/regression/xlsx_files/table09.xlsx
t/regression/xlsx_files/table10.xlsx
t/regression/xlsx_files/table11.xlsx
t/regression/xlsx_files/table12.xlsx
t/regression/xlsx_files/table13.xlsx
t/regression/xlsx_files/table14.xlsx
t/regression/xlsx_files/table15.xlsx
t/regression/xlsx_files/table17.xlsx
t/regression/xlsx_files/table18.xlsx
t/regression/xlsx_files/table19.xlsx
t/regression/xlsx_files/table21.xlsx
t/regression/xlsx_files/table22.xlsx
t/regression/xlsx_files/taint01.xlsx
t/regression/xlsx_files/taint02.xlsx
t/regression/xlsx_files/tutorial01.xlsx
t/regression/xlsx_files/tutorial02.xlsx
t/regression/xlsx_files/tutorial03.xlsx
t/regression/xlsx_files/types02.xlsx
t/regression/xlsx_files/types08.xlsx
t/regression/xlsx_files/utf8_01.xlsx
t/regression/xlsx_files/utf8_02.xlsx
t/regression/xlsx_files/utf8_03.xlsx
t/regression/xlsx_files/utf8_04.xlsx
t/regression/xlsx_files/utf8_05.xlsx
t/regression/xlsx_files/utf8_06.xlsx
t/regression/xlsx_files/utf8_07.xlsx
t/regression/xlsx_files/utf8_08.xlsx
t/regression/xlsx_files/utf8_09.xlsx
t/regression/xlsx_files/utf8_10.xlsx
t/regression/xlsx_files/utf8_11.xlsx
t/regression/xlsx_files/vbaProject01.bin
t/regression/xlsx_files/vbaProject02.bin
t/regression/xlsx_files/vml01.xlsx
t/regression/xlsx_files/vml02.xlsx
t/regression/xlsx_files/vml03.xlsx
t/regression/xlsx_files/vml04.xlsx
t/utility/xl_cell_to_rowcol.t
t/utility/xl_col_to_name.t
t/utility/xl_date_1904.t
t/utility/xl_date_list.t
t/utility/xl_dec_col.t
t/utility/xl_dec_row.t
t/utility/xl_decode_date_EU.t
t/utility/xl_decode_date_US.t
t/utility/xl_inc_col.t
t/utility/xl_inc_row.t
t/utility/xl_parse_date.t
t/utility/xl_parse_time.t
t/utility/xl_range.t
t/utility/xl_range_formula.t
t/utility/xl_rowcol_to_cell.t
t/workbook/sub_close.t
t/workbook/sub_get_chart_range.t
t/workbook/sub_sort_defined_names.t
t/workbook/sub_write_book_views.t
t/workbook/sub_write_calc_pr.t
t/workbook/sub_write_defined_name.t
t/workbook/sub_write_defined_names.t
t/workbook/sub_write_ext.t
t/workbook/sub_write_ext_lst.t
t/workbook/sub_write_file_version.t
t/workbook/sub_write_mx_arch_id.t
t/workbook/sub_write_sheet.t
t/workbook/sub_write_sheets.t
t/workbook/sub_write_workbook.t
t/workbook/sub_write_workbook_pr.t
t/workbook/sub_write_workbook_view.t
t/workbook/sub_write_xml_declaration.t
t/workbook/workbook_01.t
t/workbook/workbook_02.t
t/workbook/workbook_03.t
t/workbook/workbook_get_worksheet_by_name.t
t/worksheet/sparkline_01.t
t/worksheet/sparkline_02.t
t/worksheet/sparkline_03.t
t/worksheet/sparkline_04.t
t/worksheet/sparkline_05.t
t/worksheet/sparkline_06.t
t/worksheet/sparkline_07.t
t/worksheet/sparkline_08.t
t/worksheet/sparkline_09.t
t/worksheet/sparkline_10.t
t/worksheet/sparkline_11.t
t/worksheet/sparkline_12.t
t/worksheet/sub_calculate_spans.t
t/worksheet/sub_convert_date_time_01.t
t/worksheet/sub_convert_date_time_02.t
t/worksheet/sub_convert_date_time_03.t
t/worksheet/sub_extract_filter_tokens.t
t/worksheet/sub_parse_filter_expression.t
t/worksheet/sub_position_object.t
t/worksheet/sub_repeat_formula.t
t/worksheet/sub_write_auto_filter.t
t/worksheet/sub_write_brk.t
t/worksheet/sub_write_cell.t
t/worksheet/sub_write_cell_value.t
t/worksheet/sub_write_col_breaks.t
t/worksheet/sub_write_col_info.t
t/worksheet/sub_write_conditional_formatting.t
t/worksheet/sub_write_custom_filter.t
t/worksheet/sub_write_custom_filters.t
t/worksheet/sub_write_data_validations_01.t
t/worksheet/sub_write_data_validations_02.t
t/worksheet/sub_write_dimension.t
t/worksheet/sub_write_filter.t
t/worksheet/sub_write_filter_column.t
t/worksheet/sub_write_filters.t
t/worksheet/sub_write_header_footer.t
t/worksheet/sub_write_hyperlink.t
t/worksheet/sub_write_legacy_drawing.t
t/worksheet/sub_write_merge_cell.t
t/worksheet/sub_write_merge_cells.t
t/worksheet/sub_write_page_margins.t
t/worksheet/sub_write_page_set_up_pr.t
t/worksheet/sub_write_page_setup.t
t/worksheet/sub_write_pane.t
t/worksheet/sub_write_phonetic_pr.t
t/worksheet/sub_write_print_options.t
t/worksheet/sub_write_row.t
t/worksheet/sub_write_row_breaks.t
t/worksheet/sub_write_selection.t
t/worksheet/sub_write_sheet_calc_pr.t
t/worksheet/sub_write_sheet_data.t
t/worksheet/sub_write_sheet_format_pr.t
t/worksheet/sub_write_sheet_pr.t
t/worksheet/sub_write_sheet_protection.t
t/worksheet/sub_write_sheet_view.t
t/worksheet/sub_write_sheet_views1.t
t/worksheet/sub_write_sheet_views2.t
t/worksheet/sub_write_sheet_views3.t
t/worksheet/sub_write_sheet_views4.t
t/worksheet/sub_write_sheet_views5.t
t/worksheet/sub_write_sheet_views6.t
t/worksheet/sub_write_sheet_views7.t
t/worksheet/sub_write_sheet_views8.t
t/worksheet/sub_write_sheet_views9.t
t/worksheet/sub_write_tab_color.t
t/worksheet/sub_write_worksheet.t
t/worksheet/sub_write_xml_declaration.t
t/worksheet/worksheet_01.t
t/worksheet/worksheet_02.t
t/worksheet/worksheet_03.t
t/worksheet/worksheet_04.t
t/worksheet/worksheet_array_formula_01.t
t/worksheet/worksheet_cond_format_01.t
t/worksheet/worksheet_cond_format_02.t
t/worksheet/worksheet_cond_format_03.t
t/worksheet/worksheet_cond_format_04.t
t/worksheet/worksheet_cond_format_05.t
t/worksheet/worksheet_cond_format_06.t
t/worksheet/worksheet_cond_format_07.t
t/worksheet/worksheet_cond_format_08.t
t/worksheet/worksheet_cond_format_09.t
t/worksheet/worksheet_cond_format_10.t
t/worksheet/worksheet_cond_format_11.t
t/worksheet/worksheet_cond_format_12.t
t/worksheet/worksheet_cond_format_13.t
t/worksheet/worksheet_cond_format_14.t
t/worksheet/worksheet_cond_format_15.t
t/worksheet/worksheet_cond_format_16.t
t/worksheet/worksheet_cond_format_17.t
t/worksheet/worksheet_cond_format_18.t
t/worksheet/worksheet_cond_format_19.t
t/worksheet/worksheet_cond_format_20.t
t/worksheet/worksheet_cond_format_21.t
t/worksheet/worksheet_cond_format_22.t
t/worksheet/worksheet_cond_format_23.t
t/worksheet/worksheet_cond_format_24.t
t/worksheet/worksheet_merge_cells_01.t
t/worksheet/worksheet_merge_cells_02.t
t/worksheet/worksheet_merge_cells_03.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
Excel-Writer-XLSX-0.96/META.json 000644 000765 000024 00000002507 13157063032 016244 0 ustar 00John staff 000000 000000 {
"abstract" : "Create a new file in the Excel 2007+ XLSX format.",
"author" : [
"John McNamara (jmcnamara@cpan.org)"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.142060",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Excel-Writer-XLSX",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Archive::Zip" : "1.3",
"File::Temp" : "0.19",
"IO::File" : "1.14"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "http://github.com/jmcnamara/excel-writer-xlsx/issues"
},
"homepage" : "http://jmcnamara.github.com/excel-writer-xlsx/",
"repository" : {
"url" : "http://github.com/jmcnamara/excel-writer-xlsx"
},
"x_MailingList" : "http://groups.google.com/group/spreadsheet-writeexcel"
},
"version" : "0.96"
}
Excel-Writer-XLSX-0.96/META.yml 000644 000765 000024 00000001504 13157063032 016070 0 ustar 00John staff 000000 000000 ---
abstract: 'Create a new file in the Excel 2007+ XLSX format.'
author:
- 'John McNamara (jmcnamara@cpan.org)'
build_requires:
ExtUtils::MakeMaker: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Excel-Writer-XLSX
no_index:
directory:
- t
- inc
requires:
Archive::Zip: '1.3'
File::Temp: '0.19'
IO::File: '1.14'
resources:
MailingList: http://groups.google.com/group/spreadsheet-writeexcel
bugtracker: http://github.com/jmcnamara/excel-writer-xlsx/issues
homepage: http://jmcnamara.github.com/excel-writer-xlsx/
repository: http://github.com/jmcnamara/excel-writer-xlsx
version: '0.96'
Excel-Writer-XLSX-0.96/README 000644 000765 000024 00000004151 13157062522 015503 0 ustar 00John staff 000000 000000 NAME
Excel::Writer::XLSX - Create a new file in the Excel 2007+ XLSX format.
DESCRIPTION
The Excel::Writer::XLSX module can be used to create a new Excel file
in the 2007+ XLSX format.
The module supports the following Excel features:
* Multiple worksheets
* Strings and numbers
* Unicode text
* Cell formatting
* Formulas
* Images
* Charts
* Autofilters
* Data validation
* Conditional formatting
* Macros
* Tables
* Shapes
* Sparklines
* Hyperlinks
* Rich string formats
* Defined names
* Grouping/Outlines
* Cell comments
* Panes
* Page set-up and printing options
Excel::Writer::XLSX uses the same interface as Spreadsheet::WriteExcel.
SYNOPSIS
To write a string, a formatted string, a number and a formula to
the first worksheet in an Excel XML spreadsheet called perl.xls:
use Excel::Writer::XLSX;
# Create a new Excel workbook
my $workbook = Excel::Writer::XLSX->new('perl.xlsx');
# Add a worksheet
$worksheet = $workbook->add_worksheet();
# Add and define a format
$format = $workbook->add_format(); # Add a format
$format->set_bold();
$format->set_color('red');
$format->set_align('center');
# Write a formatted and unformatted string, row and column notation.
$col = $row = 0;
$worksheet->write($row, $col, "Hi Excel!", $format);
$worksheet->write(1, $col, "Hi Excel!");
# Write a number and a formula using A1 notation
$worksheet->write('A3', 1.2345);
$worksheet->write('A4', '=SIN(PI()/4)');
INSTALLATION
Use the standard Unix style installation.
Unzip and untar the module as follows:
tar -zxvf Excel-Writer-XLSX-0.96.tar.gz
The module can be installed using the standard Perl procedure:
perl Makefile.PL
make
make test
make install # As sudo/root
AUTHOR
John McNamara (jmcnamara@cpan.org)
Excel-Writer-XLSX-0.96/t/ 000755 000765 000024 00000000000 13157063031 015061 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/chart/ 000755 000765 000024 00000000000 13157063032 016163 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/chartsheet/ 000755 000765 000024 00000000000 13157063031 017213 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/drawing/ 000755 000765 000024 00000000000 13157063032 016515 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/lib/ 000755 000765 000024 00000000000 13157063031 015627 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/package/ 000755 000765 000024 00000000000 13157063031 016454 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/regression/ 000755 000765 000024 00000000000 13157063032 017242 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/utility/ 000755 000765 000024 00000000000 13157063031 016564 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/workbook/ 000755 000765 000024 00000000000 13157063031 016716 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/worksheet/ 000755 000765 000024 00000000000 13157063032 017075 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.96/t/worksheet/sparkline_01.t 000644 000765 000024 00000004063 13032306506 021553 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
# No sparkline in the first testcase.
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_02.t 000644 000765 000024 00000006102 13032306506 021550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'Sheet1!A1:E1',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_03.t 000644 000765 000024 00000010406 13032306506 021553 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Excel::Writer::XLSX::Utility ':rowcol';
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => xl_rowcol_to_cell( 0, 5 ),
range => xl_range_formula( 'Sheet1', 0, 0, 0, 4 ),
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => xl_range( 1, 1, 0, 4 ),
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_04.t 000644 000765 000024 00000006157 13032306506 021564 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'Sheet1!A1:E1',
type => 'column',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_05.t 000644 000765 000024 00000006165 13032306506 021564 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => ['$F$1'],
range => ['$A$1:$E$1'],
type => 'win_loss',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_06.t 000644 000765 000024 00000007035 13032306506 021562 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => [ 'F1', 'F2' ],
range => [ 'A1:E1', 'A2:E2' ],
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A1:E1
F1
Sheet1!A2:E2
F2
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_07.t 000644 000765 000024 00000024574 13032306506 021572 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
$worksheet->write('A3', $data);
$worksheet->write('A4', $data);
$worksheet->write('A5', $data);
$worksheet->write('A6', $data);
$worksheet->write('A7', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
type => 'column',
high_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
type => 'column',
low_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
type => 'column',
negative_points => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F4',
range => 'A4:E4',
type => 'column',
first_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F5',
range => 'A5:E5',
type => 'column',
last_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F6',
range => 'A6:E6',
type => 'column',
markers => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F7',
range => 'A7:E7',
type => 'column',
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A7:E7
F7
Sheet1!A6:E6
F6
Sheet1!A5:E5
F5
Sheet1!A4:E4
F4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_08.t 000644 000765 000024 00000012550 13032306506 021562 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
$worksheet->write('A3', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
style => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
style => 2,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
series_color => '#FF0000',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_09.t 000644 000765 000024 00000112304 13032306506 021561 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
# Set up sparklines
# Test all the styles.
for my $i ( 1 .. 36 ) {
$worksheet->write( $i - 1, 0, $data );
$worksheet->add_sparkline(
{
location => 'F' . $i,
range => 'A' . $i . ':E' . $i,
style => $i,
}
);
}
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A36:E36
F36
Sheet1!A35:E35
F35
Sheet1!A34:E34
F34
Sheet1!A33:E33
F33
Sheet1!A32:E32
F32
Sheet1!A31:E31
F31
Sheet1!A30:E30
F30
Sheet1!A29:E29
F29
Sheet1!A28:E28
F28
Sheet1!A27:E27
F27
Sheet1!A26:E26
F26
Sheet1!A25:E25
F25
Sheet1!A24:E24
F24
Sheet1!A23:E23
F23
Sheet1!A22:E22
F22
Sheet1!A21:E21
F21
Sheet1!A20:E20
F20
Sheet1!A19:E19
F19
Sheet1!A18:E18
F18
Sheet1!A17:E17
F17
Sheet1!A16:E16
F16
Sheet1!A15:E15
F15
Sheet1!A14:E14
F14
Sheet1!A13:E13
F13
Sheet1!A12:E12
F12
Sheet1!A11:E11
F11
Sheet1!A10:E10
F10
Sheet1!A9:E9
F9
Sheet1!A8:E8
F8
Sheet1!A7:E7
F7
Sheet1!A6:E6
F6
Sheet1!A5:E5
F5
Sheet1!A4:E4
F4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_10.t 000644 000765 000024 00000006766 13032306506 021567 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
series_color => '#C00000',
negative_color => '#FF0000',
markers_color => '#FFC000',
first_color => '#00B050',
last_color => '#00B0F0',
high_color => '#FFFF00',
low_color => '#92D050',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_11.t 000644 000765 000024 00000015046 13032306506 021557 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions
qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet( \$got );
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A2', $data );
$worksheet->write( 'A3', $data );
$worksheet->write( 'A4', [ 1, 2, 3, 4, 5 ] );
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
max => 0.5,
min => -0.5,
axis => 1,
reverse => 1,
empty_cells => 'zero',
weight => 0.25,
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
max => 'group',
min => 'group',
empty_cells => 'connect',
weight => 2.25,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
max => 'group',
min => '0',
show_hidden => 1,
weight => 6,
date_axis => 'A4:E4',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
1
2
3
4
5
Sheet1!A4:E4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sparkline_12.t 000644 000765 000024 00000006266 13032306506 021564 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'Sheet1!A1:E1',
max => 4,
min => 0,
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.96/t/worksheet/sub_calculate_spans.t 000644 000765 000024 00000022601 13032306506 023273 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Worksheet;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $row;
my $col;
my $worksheet;
###############################################################################
#
# 1. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 0;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:16', '17:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 2. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 1;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:15', '16:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 3. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 2;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:14', '15:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 4. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 3;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:13', '14:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 5. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 4;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:12', '13:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 6. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 5;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:11', '12:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 7. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 6;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:10', '11:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 8. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 7;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:9', '10:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 9. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 8;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:8', '9:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 10. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 9;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:7', '8:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 11. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 10;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:6', '7:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 12. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 11;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:5', '6:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 13. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 12;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:4', '5:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 14. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 13;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:3', '4:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 15. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 14;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:2', '3:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 16. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 15;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:1', '2:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 17. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 16;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ undef, '1:16', '17:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 18. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 16;
$col = 1;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ undef, '2:17', '18:18' ];
is_deeply( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_convert_date_time_01.t 000644 000765 000024 00000055352 13032306506 024136 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 100;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
$worksheet->{_date_1904} = 0;
# Set float difference limit to half of an Excel millisecond
my $flt_delta = 0.5 / ( 24 * 60 * 60 * 1000 );
##############################################################################
#
# Float comparison function.
#
sub flt_cmp {
return abs( $_[0] - $_[1] ) < $flt_delta;
}
##############################################################################
#
# Test the flt_cmp() function used in the other tests.
#
$date_time = '1899-12-31T00:00:00.0004';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 1. This should pass. It is less than the float diff limit.
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" );
$date_time = '1899-12-31T00:00:00.0005';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 2. This should fail. It is equal to the float diff limit.
my $diff = !flt_cmp( $number, $result );
ok( $diff, " Testing convert_date_time: $date_time $number" );
##############################################################################
#
# Test the time data generated in Excel.
#
while ( ) {
last if /^# stop/; # For debugging
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
if ( /"DateTime">([^<]+)/ ) {
my $date_time = $1;
my $line = ;
if ( $line =~ /"Number">([^<]+)/ ) {
my $number = 0 + $1;
my $result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" )
or diag( "difference between $number and $result\n" . "= "
. abs( $number - $result ) . "\n"
. "> $flt_delta" );
}
}
}
__DATA__
# Test data taken from Excel in XML format.
1899-12-31T00:00:00.000 |
0 |
1982-08-25T00:15:20.213 |
30188.010650613425 |
2065-04-19T00:16:48.290 |
60376.011670023145 |
2147-12-15T00:55:25.446 |
90565.038488958337 |
2230-08-10T01:02:46.891 |
120753.04359827546 |
2313-04-06T01:04:15.597 |
150942.04462496529 |
2395-11-30T01:09:40.889 |
181130.04838991899 |
2478-07-25T01:11:32.560 |
211318.04968240741 |
2561-03-21T01:30:19.169 |
241507.06272186342 |
2643-11-15T01:48:25.580 |
271695.07529606484 |
2726-07-12T02:03:31.919 |
301884.08578609955 |
2809-03-06T02:11:11.986 |
332072.09111094906 |
2891-10-31T02:24:37.095 |
362261.10042934027 |
2974-06-26T02:35:07.220 |
392449.10772245371 |
3057-02-19T02:45:12.109 |
422637.1147234838 |
3139-10-17T03:06:39.990 |
452826.12962951389 |
3222-06-11T03:08:08.251 |
483014.13065105322 |
3305-02-05T03:19:12.576 |
513203.13834 |
3387-10-01T03:29:42.574 |
543391.14563164348 |
3470-05-27T03:37:30.813 |
573579.15105107636 |
3553-01-21T04:14:38.231 |
603768.17683137732 |
3635-09-16T04:16:28.559 |
633956.17810832174 |
3718-05-13T04:17:58.222 |
664145.17914608796 |
3801-01-06T04:21:41.794 |
694333.18173372687 |
3883-09-02T04:56:35.792 |
724522.20596981479 |
3966-04-28T05:25:14.885 |
754710.2258667245 |
4048-12-21T05:26:05.724 |
784898.22645513888 |
4131-08-18T05:46:44.068 |
815087.24078782403 |
4214-04-13T05:48:01.141 |
845275.24167987274 |
4296-12-07T05:53:52.315 |
875464.24574438657 |
4379-08-03T06:14:48.580 |
905652.26028449077 |
4462-03-28T06:46:15.738 |
935840.28212659725 |
4544-11-22T07:31:20.407 |
966029.31343063654 |
4627-07-19T07:58:33.754 |
996217.33233511576 |
4710-03-15T08:07:43.130 |
1026406.3386936343 |
4792-11-07T08:29:11.091 |
1056594.3536005903 |
4875-07-04T09:08:15.328 |
1086783.3807329629 |
4958-02-27T09:30:41.781 |
1116971.3963169097 |
5040-10-23T09:34:04.462 |
1147159.3986627546 |
5123-06-20T09:37:23.945 |
1177348.4009715857 |
5206-02-12T09:37:56.655 |
1207536.4013501736 |
5288-10-08T09:45:12.230 |
1237725.406391551 |
5371-06-04T09:54:14.782 |
1267913.412671088 |
5454-01-28T09:54:22.108 |
1298101.4127558796 |
5536-09-24T10:01:36.151 |
1328290.4177795255 |
5619-05-20T12:09:48.602 |
1358478.5068125231 |
5702-01-14T12:34:08.549 |
1388667.5237100578 |
5784-09-08T12:56:06.495 |
1418855.5389640625 |
5867-05-06T12:58:58.217 |
1449044.5409515856 |
5949-12-30T12:59:54.263 |
1479232.5416002662 |
6032-08-24T13:34:41.331 |
1509420.5657561459 |
6115-04-21T13:58:28.601 |
1539609.5822754744 |
6197-12-14T14:02:16.899 |
1569797.5849178126 |
6280-08-10T14:36:17.444 |
1599986.6085352316 |
6363-04-06T14:37:57.451 |
1630174.60969272 |
6445-11-30T14:57:42.757 |
1660363.6234115392 |
6528-07-26T15:10:48.307 |
1690551.6325035533 |
6611-03-22T15:14:39.890 |
1720739.635183912 |
6693-11-15T15:19:47.988 |
1750928.6387498612 |
6776-07-11T16:04:24.344 |
1781116.6697262037 |
6859-03-07T16:22:23.952 |
1811305.6822216667 |
6941-10-31T16:29:55.999 |
1841493.6874536921 |
7024-06-26T16:58:20.259 |
1871681.7071789235 |
7107-02-21T17:04:02.415 |
1901870.7111390624 |
7189-10-16T17:18:29.630 |
1932058.7211762732 |
7272-06-11T17:47:21.323 |
1962247.7412190163 |
7355-02-05T17:53:29.866 |
1992435.7454845603 |
7437-10-02T17:53:41.076 |
2022624.7456143056 |
7520-05-28T17:55:06.044 |
2052812.7465977315 |
7603-01-21T18:14:49.151 |
2083000.7602910995 |
7685-09-16T18:17:45.738 |
2113189.7623349307 |
7768-05-12T18:29:59.700 |
2143377.7708298611 |
7851-01-07T18:33:21.233 |
2173566.773162419 |
7933-09-02T19:14:24.673 |
2203754.8016744559 |
8016-04-27T19:17:12.816 |
2233942.8036205554 |
8098-12-22T19:23:36.418 |
2264131.8080603937 |
8181-08-17T19:46:25.908 |
2294319.8239109721 |
8264-04-13T20:07:47.314 |
2324508.8387420601 |
8346-12-08T20:31:37.603 |
2354696.855296331 |
8429-08-03T20:39:57.770 |
2384885.8610853008 |
8512-03-29T20:50:17.067 |
2415073.8682530904 |
8594-11-22T21:02:57.827 |
2445261.8770581828 |
8677-07-19T21:23:05.519 |
2475450.8910360998 |
8760-03-14T21:34:49.572 |
2505638.8991848612 |
8842-11-08T21:39:05.944 |
2535827.9021521294 |
8925-07-04T21:39:18.426 |
2566015.9022965971 |
9008-02-28T21:46:07.769 |
2596203.9070343636 |
9090-10-24T21:57:55.662 |
2626392.9152275696 |
9173-06-19T22:19:11.732 |
2656580.9299968979 |
9256-02-13T22:23:51.376 |
2686769.9332335186 |
9338-10-09T22:27:58.771 |
2716957.9360968866 |
9421-06-05T22:43:30.392 |
2747146.9468795368 |
9504-01-30T22:48:25.834 |
2777334.9502990046 |
9586-09-24T22:53:51.727 |
2807522.9540709145 |
9669-05-20T23:12:56.536 |
2837711.9673210187 |
9752-01-14T23:15:54.109 |
2867899.9693762613 |
9834-09-10T23:17:12.632 |
2898088.9702850925 |
9999-12-31T23:59:59.000 |
2958465.999988426 |
Excel-Writer-XLSX-0.96/t/worksheet/sub_convert_date_time_02.t 000644 000765 000024 00000032252 13032306506 024131 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
# Tests dates in 1900 and 1904 format.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 420;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
##############################################################################
#
# Test the dates generated by Excel.
#
while () {
last if /^# stop/; # For debugging
$worksheet->{_date_1904} = 0 if /Excel 1900/; # Change date system
$worksheet->{_date_1904} = 1 if /Excel 1904/; # Change date system
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
my ($count, $date, $result) = split;
my $number = $worksheet->convert_date_time($date);
$number = -1 unless defined $number;
is($number, $result, " Testing convert_date_time: $date $result")
}
__DATA__
#
# The following data was generated by Excel.
#
#
# Excel 1900 date system
#
1 1899-12-31T 0
2 1900-01-00T 0
3 1900-01-01T 1
4 1900-02-27T 58
5 1900-02-28T 59
6 1900-02-29T 60
7 1900-03-01T 61
8 1900-03-02T 62
9 1900-03-11T 71
10 1900-04-08T 99
11 1900-09-12T 256
12 1901-05-03T 489
13 1901-10-13T 652
14 1902-02-15T 777
15 1902-06-06T 888
16 1902-09-25T 999
17 1902-09-27T 1001
18 1903-04-26T 1212
19 1903-08-05T 1313
20 1903-12-31T 1461
21 1904-01-01T 1462
22 1904-02-28T 1520
23 1904-02-29T 1521
24 1904-03-01T 1522
25 1907-02-27T 2615
26 1907-02-28T 2616
27 1907-03-01T 2617
28 1907-03-02T 2618
29 1907-03-03T 2619
30 1907-03-04T 2620
31 1907-03-05T 2621
32 1907-03-06T 2622
33 1999-01-01T 36161
34 1999-01-31T 36191
35 1999-02-01T 36192
36 1999-02-28T 36219
37 1999-03-01T 36220
38 1999-03-31T 36250
39 1999-04-01T 36251
40 1999-04-30T 36280
41 1999-05-01T 36281
42 1999-05-31T 36311
43 1999-06-01T 36312
44 1999-06-30T 36341
45 1999-07-01T 36342
46 1999-07-31T 36372
47 1999-08-01T 36373
48 1999-08-31T 36403
49 1999-09-01T 36404
50 1999-09-30T 36433
51 1999-10-01T 36434
52 1999-10-31T 36464
53 1999-11-01T 36465
54 1999-11-30T 36494
55 1999-12-01T 36495
56 1999-12-31T 36525
57 2000-01-01T 36526
58 2000-01-31T 36556
59 2000-02-01T 36557
60 2000-02-29T 36585
61 2000-03-01T 36586
62 2000-03-31T 36616
63 2000-04-01T 36617
64 2000-04-30T 36646
65 2000-05-01T 36647
66 2000-05-31T 36677
67 2000-06-01T 36678
68 2000-06-30T 36707
69 2000-07-01T 36708
70 2000-07-31T 36738
71 2000-08-01T 36739
72 2000-08-31T 36769
73 2000-09-01T 36770
74 2000-09-30T 36799
75 2000-10-01T 36800
76 2000-10-31T 36830
77 2000-11-01T 36831
78 2000-11-30T 36860
79 2000-12-01T 36861
80 2000-12-31T 36891
81 2001-01-01T 36892
82 2001-01-31T 36922
83 2001-02-01T 36923
84 2001-02-28T 36950
85 2001-03-01T 36951
86 2001-03-31T 36981
87 2001-04-01T 36982
88 2001-04-30T 37011
89 2001-05-01T 37012
90 2001-05-31T 37042
91 2001-06-01T 37043
92 2001-06-30T 37072
93 2001-07-01T 37073
94 2001-07-31T 37103
95 2001-08-01T 37104
96 2001-08-31T 37134
97 2001-09-01T 37135
98 2001-09-30T 37164
99 2001-10-01T 37165
100 2001-10-31T 37195
101 2001-11-01T 37196
102 2001-11-30T 37225
103 2001-12-01T 37226
104 2001-12-31T 37256
105 2400-01-01T 182623
106 2400-01-31T 182653
107 2400-02-01T 182654
108 2400-02-29T 182682
109 2400-03-01T 182683
110 2400-03-31T 182713
111 2400-04-01T 182714
112 2400-04-30T 182743
113 2400-05-01T 182744
114 2400-05-31T 182774
115 2400-06-01T 182775
116 2400-06-30T 182804
117 2400-07-01T 182805
118 2400-07-31T 182835
119 2400-08-01T 182836
120 2400-08-31T 182866
121 2400-09-01T 182867
122 2400-09-30T 182896
123 2400-10-01T 182897
124 2400-10-31T 182927
125 2400-11-01T 182928
126 2400-11-30T 182957
127 2400-12-01T 182958
128 2400-12-31T 182988
129 4000-01-01T 767011
130 4000-01-31T 767041
131 4000-02-01T 767042
132 4000-02-29T 767070
133 4000-03-01T 767071
134 4000-03-31T 767101
135 4000-04-01T 767102
136 4000-04-30T 767131
137 4000-05-01T 767132
138 4000-05-31T 767162
139 4000-06-01T 767163
140 4000-06-30T 767192
141 4000-07-01T 767193
142 4000-07-31T 767223
143 4000-08-01T 767224
144 4000-08-31T 767254
145 4000-09-01T 767255
146 4000-09-30T 767284
147 4000-10-01T 767285
148 4000-10-31T 767315
149 4000-11-01T 767316
150 4000-11-30T 767345
151 4000-12-01T 767346
152 4000-12-31T 767376
153 4321-01-01T 884254
154 4321-01-31T 884284
155 4321-02-01T 884285
156 4321-02-28T 884312
157 4321-03-01T 884313
158 4321-03-31T 884343
159 4321-04-01T 884344
160 4321-04-30T 884373
161 4321-05-01T 884374
162 4321-05-31T 884404
163 4321-06-01T 884405
164 4321-06-30T 884434
165 4321-07-01T 884435
166 4321-07-31T 884465
167 4321-08-01T 884466
168 4321-08-31T 884496
169 4321-09-01T 884497
170 4321-09-30T 884526
171 4321-10-01T 884527
172 4321-10-31T 884557
173 4321-11-01T 884558
174 4321-11-30T 884587
175 4321-12-01T 884588
176 4321-12-31T 884618
177 9999-01-01T 2958101
178 9999-01-31T 2958131
179 9999-02-01T 2958132
180 9999-02-28T 2958159
181 9999-03-01T 2958160
182 9999-03-31T 2958190
183 9999-04-01T 2958191
184 9999-04-30T 2958220
185 9999-05-01T 2958221
186 9999-05-31T 2958251
187 9999-06-01T 2958252
188 9999-06-30T 2958281
189 9999-07-01T 2958282
190 9999-07-31T 2958312
191 9999-08-01T 2958313
192 9999-08-31T 2958343
193 9999-09-01T 2958344
194 9999-09-30T 2958373
195 9999-10-01T 2958374
196 9999-10-31T 2958404
197 9999-11-01T 2958405
198 9999-11-30T 2958434
199 9999-12-01T 2958435
200 9999-12-31T 2958465
#
# Excel 1904 date system
#
201 1904-01-01T 0
202 1904-01-31T 30
203 1904-02-01T 31
204 1904-02-29T 59
205 1904-03-01T 60
206 1904-03-31T 90
207 1904-04-01T 91
208 1904-04-30T 120
209 1904-05-01T 121
210 1904-05-31T 151
211 1904-06-01T 152
212 1904-06-30T 181
213 1904-07-01T 182
214 1904-07-31T 212
215 1904-08-01T 213
216 1904-08-31T 243
217 1904-09-01T 244
218 1904-09-30T 273
219 1904-10-01T 274
220 1904-10-31T 304
221 1904-11-01T 305
222 1904-11-30T 334
223 1904-12-01T 335
224 1904-12-31T 365
225 1907-02-27T 1153
226 1907-02-28T 1154
227 1907-03-01T 1155
228 1907-03-02T 1156
229 1907-03-03T 1157
230 1907-03-04T 1158
231 1907-03-05T 1159
232 1907-03-06T 1160
233 1999-01-01T 34699
234 1999-01-31T 34729
235 1999-02-01T 34730
236 1999-02-28T 34757
237 1999-03-01T 34758
238 1999-03-31T 34788
239 1999-04-01T 34789
240 1999-04-30T 34818
241 1999-05-01T 34819
242 1999-05-31T 34849
243 1999-06-01T 34850
244 1999-06-30T 34879
245 1999-07-01T 34880
246 1999-07-31T 34910
247 1999-08-01T 34911
248 1999-08-31T 34941
249 1999-09-01T 34942
250 1999-09-30T 34971
251 1999-10-01T 34972
252 1999-10-31T 35002
253 1999-11-01T 35003
254 1999-11-30T 35032
255 1999-12-01T 35033
256 1999-12-31T 35063
257 2000-01-01T 35064
258 2000-01-31T 35094
259 2000-02-01T 35095
260 2000-02-29T 35123
261 2000-03-01T 35124
262 2000-03-31T 35154
263 2000-04-01T 35155
264 2000-04-30T 35184
265 2000-05-01T 35185
266 2000-05-31T 35215
267 2000-06-01T 35216
268 2000-06-30T 35245
269 2000-07-01T 35246
270 2000-07-31T 35276
271 2000-08-01T 35277
272 2000-08-31T 35307
273 2000-09-01T 35308
274 2000-09-30T 35337
275 2000-10-01T 35338
276 2000-10-31T 35368
277 2000-11-01T 35369
278 2000-11-30T 35398
279 2000-12-01T 35399
280 2000-12-31T 35429
281 2001-01-01T 35430
282 2001-01-31T 35460
283 2001-02-01T 35461
284 2001-02-28T 35488
285 2001-03-01T 35489
286 2001-03-31T 35519
287 2001-04-01T 35520
288 2001-04-30T 35549
289 2001-05-01T 35550
290 2001-05-31T 35580
291 2001-06-01T 35581
292 2001-06-30T 35610
293 2001-07-01T 35611
294 2001-07-31T 35641
295 2001-08-01T 35642
296 2001-08-31T 35672
297 2001-09-01T 35673
298 2001-09-30T 35702
299 2001-10-01T 35703
300 2001-10-31T 35733
301 2001-11-01T 35734
302 2001-11-30T 35763
303 2001-12-01T 35764
304 2001-12-31T 35794
305 2400-01-01T 181161
306 2400-01-31T 181191
307 2400-02-01T 181192
308 2400-02-29T 181220
309 2400-03-01T 181221
310 2400-03-31T 181251
311 2400-04-01T 181252
312 2400-04-30T 181281
313 2400-05-01T 181282
314 2400-05-31T 181312
315 2400-06-01T 181313
316 2400-06-30T 181342
317 2400-07-01T 181343
318 2400-07-31T 181373
319 2400-08-01T 181374
320 2400-08-31T 181404
321 2400-09-01T 181405
322 2400-09-30T 181434
323 2400-10-01T 181435
324 2400-10-31T 181465
325 2400-11-01T 181466
326 2400-11-30T 181495
327 2400-12-01T 181496
328 2400-12-31T 181526
329 4000-01-01T 765549
330 4000-01-31T 765579
331 4000-02-01T 765580
332 4000-02-29T 765608
333 4000-03-01T 765609
334 4000-03-31T 765639
335 4000-04-01T 765640
336 4000-04-30T 765669
337 4000-05-01T 765670
338 4000-05-31T 765700
339 4000-06-01T 765701
340 4000-06-30T 765730
341 4000-07-01T 765731
342 4000-07-31T 765761
343 4000-08-01T 765762
344 4000-08-31T 765792
345 4000-09-01T 765793
346 4000-09-30T 765822
347 4000-10-01T 765823
348 4000-10-31T 765853
349 4000-11-01T 765854
350 4000-11-30T 765883
351 4000-12-01T 765884
352 4000-12-31T 765914
353 4321-01-01T 882792
354 4321-01-31T 882822
355 4321-02-01T 882823
356 4321-02-28T 882850
357 4321-03-01T 882851
358 4321-03-31T 882881
359 4321-04-01T 882882
360 4321-04-30T 882911
361 4321-05-01T 882912
362 4321-05-31T 882942
363 4321-06-01T 882943
364 4321-06-30T 882972
365 4321-07-01T 882973
366 4321-07-31T 883003
367 4321-08-01T 883004
368 4321-08-31T 883034
369 4321-09-01T 883035
370 4321-09-30T 883064
371 4321-10-01T 883065
372 4321-10-31T 883095
373 4321-11-01T 883096
374 4321-11-30T 883125
375 4321-12-01T 883126
376 4321-12-31T 883156
377 9999-01-01T 2956639
378 9999-01-31T 2956669
379 9999-02-01T 2956670
380 9999-02-28T 2956697
381 9999-03-01T 2956698
382 9999-03-31T 2956728
383 9999-04-01T 2956729
384 9999-04-30T 2956758
385 9999-05-01T 2956759
386 9999-05-31T 2956789
387 9999-06-01T 2956790
388 9999-06-30T 2956819
389 9999-07-01T 2956820
390 9999-07-31T 2956850
391 9999-08-01T 2956851
392 9999-08-31T 2956881
393 9999-09-01T 2956882
394 9999-09-30T 2956911
395 9999-10-01T 2956912
396 9999-10-31T 2956942
397 9999-11-01T 2956943
398 9999-11-30T 2956972
399 9999-12-01T 2956973
400 9999-12-31T 2957003
#
# The following dates are invalid.
#
#
# Excel 1900 date system
#
401 0000-12-30T -1 # Below year range.
402 1000-12-30T -1 # Below year range.
403 1899-12-30T -1 # Below year range.
404 2002-02-29T -1 # False leap-day.
405 2000-00-00T -1 # No month or day.
406 2000-01-00T -1 # No day.
407 2000-00-01T -1 # No month.
408 2000-13-01T -1 # Month out of range.
409 2000-12-32T -1 # Day out of range.
410 10000-01-01T -1 # Year out of range.
#
# Excel 1904 date system
#
411 1899-12-31T -1 # Below year range.
412 1900-01-01T -1 # Below year range.
413 1903-12-31T -1 # Below year range.
414 2001-02-29T -1 # False leap-day.
415 2000-00-00T -1 # No month or day.
416 2000-01-00T -1 # No day.
417 2000-00-01T -1 # No month.
418 2000-13-01T -1 # Month out of range.
419 2000-12-32T -1 # Day out of range.
420 10000-01-01T -1 # Year out of range.
Excel-Writer-XLSX-0.96/t/worksheet/sub_convert_date_time_03.t 000644 000765 000024 00000057523 13032306506 024142 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
#
# Tests date and time second handling.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 104;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
$worksheet->{_date_1904} = 0;
# Set float difference limit to half of an Excel millisecond
my $flt_delta = 0.5 / ( 24 * 60 * 60 * 1000 );
##############################################################################
#
# Float comparison function.
#
sub flt_cmp {
return abs( $_[0] - $_[1] ) < $flt_delta;
}
##############################################################################
#
# Test the flt_cmp() function used in the other tests.
#
$date_time = '1899-12-31T00:00:00.0004';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 1. This should pass. It is less than the float diff limit.
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" );
$date_time = '1899-12-31T00:00:00.0005';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 2. This should fail. It is equal to the float diff limit.
my $diff = !flt_cmp( $number, $result );
ok( $diff, " Testing convert_date_time: $date_time $number" );
##############################################################################
#
# Test some false times.
#
# These should fail.
my $fail;
$date_time = '1899-12-31T24:00:00.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect hour caught." );
$date_time = '1899-12-31T00:60:00.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect mins caught." );
$date_time = '1899-12-31T00:00:60.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect secs caught." );
$date_time = '1899-12-31T00:00:59.999999999999999999';
# Workaround for increased precision with longdouble perls.
$date_time .= "9" x length (1 - 1e-16);
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect secs caught." );
##############################################################################
#
# Test the time data generated in Excel.
#
while ( ) {
last if /^# stop/; # For debugging
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
if ( /"DateTime">([^<]+)/ ) {
my $date_time = $1;
my $line = ;
if ( $line =~ /"Number">([^<]+)/ ) {
my $number = 0 + $1;
my $result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" )
or diag( "difference between $number and $result\n" . "= "
. abs( $number - $result ) . "\n"
. "> $flt_delta" );
}
}
}
__DATA__
# Test data taken from Excel in XML format.
1899-12-31T00:00:00.000 |
0 |
1899-12-31T00:15:20.213 |
1.0650613425925924E-2 |
1899-12-31T00:16:48.290 |
1.1670023148148148E-2 |
1899-12-31T00:55:25.446 |
3.8488958333333337E-2 |
1899-12-31T01:02:46.891 |
4.3598275462962965E-2 |
1899-12-31T01:04:15.597 |
4.4624965277777782E-2 |
1899-12-31T01:09:40.889 |
4.8389918981481483E-2 |
1899-12-31T01:11:32.560 |
4.9682407407407404E-2 |
1899-12-31T01:30:19.169 |
6.2721863425925936E-2 |
1899-12-31T01:48:25.580 |
7.5296064814814809E-2 |
1899-12-31T02:03:31.919 |
8.5786099537037031E-2 |
1899-12-31T02:11:11.986 |
9.1110949074074077E-2 |
1899-12-31T02:24:37.095 |
0.10042934027777778 |
1899-12-31T02:35:07.220 |
0.1077224537037037 |
1899-12-31T02:45:12.109 |
0.11472348379629631 |
1899-12-31T03:06:39.990 |
0.12962951388888888 |
1899-12-31T03:08:08.251 |
0.13065105324074075 |
1899-12-31T03:19:12.576 |
0.13833999999999999 |
1899-12-31T03:29:42.574 |
0.14563164351851851 |
1899-12-31T03:37:30.813 |
0.1510510763888889 |
1899-12-31T04:14:38.231 |
0.1768313773148148 |
1899-12-31T04:16:28.559 |
0.17810832175925925 |
1899-12-31T04:17:58.222 |
0.17914608796296297 |
1899-12-31T04:21:41.794 |
0.18173372685185185 |
1899-12-31T04:56:35.792 |
0.2059698148148148 |
1899-12-31T05:25:14.885 |
0.22586672453703704 |
1899-12-31T05:26:05.724 |
0.22645513888888891 |
1899-12-31T05:46:44.068 |
0.24078782407407406 |
1899-12-31T05:48:01.141 |
0.2416798726851852 |
1899-12-31T05:53:52.315 |
0.24574438657407408 |
1899-12-31T06:14:48.580 |
0.26028449074074073 |
1899-12-31T06:46:15.738 |
0.28212659722222222 |
1899-12-31T07:31:20.407 |
0.31343063657407405 |
1899-12-31T07:58:33.754 |
0.33233511574074076 |
1899-12-31T08:07:43.130 |
0.33869363425925925 |
1899-12-31T08:29:11.091 |
0.35360059027777774 |
1899-12-31T09:08:15.328 |
0.380732962962963 |
1899-12-31T09:30:41.781 |
0.39631690972222228 |
1899-12-31T09:34:04.462 |
0.39866275462962958 |
1899-12-31T09:37:23.945 |
0.40097158564814817 |
1899-12-31T09:37:56.655 |
0.40135017361111114 |
1899-12-31T09:45:12.230 |
0.40639155092592594 |
1899-12-31T09:54:14.782 |
0.41267108796296298 |
1899-12-31T09:54:22.108 |
0.41275587962962962 |
1899-12-31T10:01:36.151 |
0.41777952546296299 |
1899-12-31T12:09:48.602 |
0.50681252314814818 |
1899-12-31T12:34:08.549 |
0.52371005787037039 |
1899-12-31T12:56:06.495 |
0.53896406249999995 |
1899-12-31T12:58:58.217 |
0.54095158564814816 |
1899-12-31T12:59:54.263 |
0.54160026620370372 |
1899-12-31T13:34:41.331 |
0.56575614583333333 |
1899-12-31T13:58:28.601 |
0.58227547453703699 |
1899-12-31T14:02:16.899 |
0.58491781249999997 |
1899-12-31T14:36:17.444 |
0.60853523148148148 |
1899-12-31T14:37:57.451 |
0.60969271990740748 |
1899-12-31T14:57:42.757 |
0.6234115393518519 |
1899-12-31T15:10:48.307 |
0.6325035532407407 |
1899-12-31T15:14:39.890 |
0.63518391203703706 |
1899-12-31T15:19:47.988 |
0.63874986111111109 |
1899-12-31T16:04:24.344 |
0.66972620370370362 |
1899-12-31T16:22:23.952 |
0.68222166666666662 |
1899-12-31T16:29:55.999 |
0.6874536921296297 |
1899-12-31T16:58:20.259 |
0.70717892361111112 |
1899-12-31T17:04:02.415 |
0.71113906250000003 |
1899-12-31T17:18:29.630 |
0.72117627314814825 |
1899-12-31T17:47:21.323 |
0.74121901620370367 |
1899-12-31T17:53:29.866 |
0.74548456018518516 |
1899-12-31T17:53:41.076 |
0.74561430555555563 |
1899-12-31T17:55:06.044 |
0.74659773148148145 |
1899-12-31T18:14:49.151 |
0.760291099537037 |
1899-12-31T18:17:45.738 |
0.76233493055555546 |
1899-12-31T18:29:59.700 |
0.77082986111111118 |
1899-12-31T18:33:21.233 |
0.77316241898148153 |
1899-12-31T19:14:24.673 |
0.80167445601851861 |
1899-12-31T19:17:12.816 |
0.80362055555555545 |
1899-12-31T19:23:36.418 |
0.80806039351851855 |
1899-12-31T19:46:25.908 |
0.82391097222222232 |
1899-12-31T20:07:47.314 |
0.83874206018518516 |
1899-12-31T20:31:37.603 |
0.85529633101851854 |
1899-12-31T20:39:57.770 |
0.86108530092592594 |
1899-12-31T20:50:17.067 |
0.86825309027777775 |
1899-12-31T21:02:57.827 |
0.87705818287037041 |
1899-12-31T21:23:05.519 |
0.891036099537037 |
1899-12-31T21:34:49.572 |
0.89918486111111118 |
1899-12-31T21:39:05.944 |
0.90215212962962965 |
1899-12-31T21:39:18.426 |
0.90229659722222222 |
1899-12-31T21:46:07.769 |
0.90703436342592603 |
1899-12-31T21:57:55.662 |
0.91522756944444439 |
1899-12-31T22:19:11.732 |
0.92999689814814823 |
1899-12-31T22:23:51.376 |
0.93323351851851843 |
1899-12-31T22:27:58.771 |
0.93609688657407408 |
1899-12-31T22:43:30.392 |
0.94687953703703709 |
1899-12-31T22:48:25.834 |
0.95029900462962968 |
1899-12-31T22:53:51.727 |
0.95407091435185187 |
1899-12-31T23:12:56.536 |
0.96732101851851848 |
1899-12-31T23:15:54.109 |
0.96937626157407408 |
1899-12-31T23:17:12.632 |
0.97028509259259266 |
1899-12-31T23:59:59.999 |
0.99999998842592586 |
Excel-Writer-XLSX-0.96/t/worksheet/sub_extract_filter_tokens.t 000644 000765 000024 00000004530 13032306506 024535 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the token extraction method used to parse autofilter expressions.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet = _new_worksheet( \$got );
###############################################################################
#
# Test cases structured as [$input, [@expected_output]]
#
my @tests = (
[
undef,
[],
],
[
'',
[],
],
[
'0 < 2000',
[0, '<', 2000],
],
[
'x < 2000',
['x', '<', 2000],
],
[
'x > 2000',
['x', '>', 2000],
],
[
'x == 2000',
['x', '==', 2000],
],
[
'x > 2000 and x < 5000',
['x', '>', 2000, 'and', 'x', '<', 5000],
],
[
'x = "foo"',
['x', '=', 'foo'],
],
[
'x = foo',
['x', '=', 'foo'],
],
[
'x = "foo bar"',
['x', '=', 'foo bar'],
],
[
'x = "foo "" bar"',
['x', '=', 'foo " bar'],
],
[
'x = "foo bar" or x = "bar foo"',
['x', '=', 'foo bar', 'or', 'x', '=', 'bar foo'],
],
[
'x = "foo "" bar" or x = "bar "" foo"',
['x', '=', 'foo " bar', 'or', 'x', '=', 'bar " foo'],
],
[
'x = """"""""',
['x', '=', '"""'],
],
[
'x = Blanks',
['x', '=', 'Blanks'],
],
[
'x = NonBlanks',
['x', '=', 'NonBlanks'],
],
[
'top 10 %',
['top', 10, '%'],
],
[
'top 10 items',
['top', 10, 'items'],
],
);
###############################################################################
#
# Run the test cases.
#
for my $aref ( @tests ) {
my $expression = $aref->[0];
my $expected = $aref->[1];
my @results = $worksheet->_extract_filter_tokens( $expression );
my $testname = $expression || 'none';
_is_deep_diff( \@results, $expected, " \t" . $testname );
}
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_parse_filter_expression.t 000644 000765 000024 00000005116 13032306506 025072 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the token extraction method used to parse autofilter expressions.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 24;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet = _new_worksheet( \$got );
###############################################################################
#
# Test cases structured as [$input, [@expected_output]]
#
my @tests = (
[
'x = 2000',
[2, 2000],
],
[
'x == 2000',
[2, 2000],
],
[
'x =~ 2000',
[2, 2000],
],
[
'x eq 2000',
[2, 2000],
],
[
'x <> 2000',
[5, 2000],
],
[
'x != 2000',
[5, 2000],
],
[
'x ne 2000',
[5, 2000],
],
[
'x !~ 2000',
[5, 2000],
],
[
'x > 2000',
[4, 2000],
],
[
'x < 2000',
[1, 2000],
],
[
'x >= 2000',
[6, 2000],
],
[
'x <= 2000',
[3, 2000],
],
[
'x > 2000 and x < 5000',
[4, 2000, 0, 1, 5000],
],
[
'x > 2000 && x < 5000',
[4, 2000, 0, 1, 5000],
],
[
'x > 2000 or x < 5000',
[4, 2000, 1, 1, 5000],
],
[
'x > 2000 || x < 5000',
[4, 2000, 1, 1, 5000],
],
[
'x = Blanks',
[2, 'blanks'],
],
[
'x = NonBlanks',
[5, ' '],
],
[
'x <> Blanks',
[5, ' '],
],
[
'x <> NonBlanks',
[2, 'blanks'],
],
[
'Top 10 Items',
[30, 10],
],
[
'Top 20 %',
[31, 20],
],
[
'Bottom 5 Items',
[32, 5],
],
[
'Bottom 101 %',
[33, 101],
],
);
###############################################################################
#
# Run the test cases.
#
for my $aref ( @tests ) {
my $expression = $aref->[0];
my $expected = $aref->[1];
my @tokens = $worksheet->_extract_filter_tokens( $expression );
my @results = $worksheet->_parse_filter_expression( $expression, @tokens );
my $testname = $expression || 'none';
is_deeply( \@results, $expected, " \t" . $testname );
}
Excel-Writer-XLSX-0.96/t/worksheet/sub_position_object.t 000644 000765 000024 00000006214 13032306506 023326 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the _position_object_emus method used to calcualte the twoCellAnchor
# positions for drawing and chart objects.
#
# reverse ('(c)'), March 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my @expected;
my @got;
my $tmp = '';
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 11, 22, 304800, 76200, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 2. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 12, 22, 0, 76200, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
$worksheet->set_column( 'L:L', 3.86 );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 3. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 12, 23, 0, 0, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
$worksheet->set_column( 'L:L', 3.86 );
$worksheet->set_row( 22, 6 );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 4. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 4, 9, 304800, 114300, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 32, 32 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 5. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 19050, 28575, 5, 11, 95250, 142875, 2457450, 1552575 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 2, 3, 72, 72 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 6. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 5, 1, 19050, 28575, 6, 4, 352425, 114300, 3067050, 219075 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 5, 1, 2, 3, 99, 69 );
_is_deep_diff( \@got, \@expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_repeat_formula.t 000644 000765 000024 00000005400 13032306506 023135 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $formula;
my $row;
my $col;
my $worksheet = _new_worksheet(\$got);
my $format = undef;
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A1:A10)';
$row = 1;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A2:A10)';
$row = 2;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, 'A1', 'A2' );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A2:A10)';
$row = 3;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, qr/^A1$/, 'A2' );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'A2+A2';
$row = 4;
$col = 0;
$formula = $worksheet->store_formula( 'A1+A1' );
$worksheet->repeat_formula( $row, $col, $formula, $format, ('A1', 'A2') x 2 );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'A10 + SIN(A10)';
$row = 5;
$col = 0;
$formula = $worksheet->store_formula( 'A1 + SIN(A1)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, (qr/^A1$/, 'A10') x 2 );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_auto_filter.t 000644 000765 000024 00000031347 13032306506 023670 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 21;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $filter;
my @matches;
###############################################################################
#
# Test the _write_auto_filter() method with no filter.
#
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column()" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East or x == North';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East and x == North';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != East';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == S*'; # Begins with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != S*'; # Doesn't begin with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == *h'; # Ends with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != *h'; # Doesn't end with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x =~ *o*'; # Contains character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x !~ *r*'; # Doesn't contain character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == 1000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != 2000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x > 3000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x >= 4000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x < 5000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x <= 6000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x >= 1000 and x <= 2000'; # Between.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( East );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'A', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( East North );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'A', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( February January July June );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'D', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_brk.t 000644 000765 000024 00000001430 13032306506 022117 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_brk() method.
#
$caption = " \tWorksheet: _write_brk()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_brk( 1, 16383 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_cell.t 000644 000765 000024 00000004467 13032306506 022275 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = undef;
###############################################################################
#
# Test the _write_cell() method for numbers.
#
$caption = " \tWorksheet: _write_cell()";
$expected = '1';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 0, 0, [ 'n', 1 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for strings.
#
$caption = " \tWorksheet: _write_cell()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 3, 1, [ 's', 0 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for formulas with an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'A3+A50';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 1, 2, [ 'f', 'A3+A5', $format, 0 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for formulas without an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'A3+A50';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 1, 2, [ 'f', 'A3+A5'] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for array formulas with an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'SUM(B1:C1*B2:C2)9500';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 0, 0, [ 'a', 'SUM(B1:C1*B2:C2)', $format, 'A1', 9500 ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_cell_value.t 000644 000765 000024 00000001416 13032306506 023460 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_cell_value() method.
#
$caption = " \tWorksheet: _write_cell_value()";
$expected = '1';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell_value(1);
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_col_breaks.t 000644 000765 000024 00000002551 13032306506 023452 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_col_breaks() method.
#
$caption = " \tWorksheet: _write_col_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_vbreaks} = [1];
$worksheet->_write_col_breaks();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_col_breaks() method.
#
$caption = " \tWorksheet: _write_col_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_vbreaks} = [8, 3, 1, 0];
$worksheet->_write_col_breaks();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_col_info.t 000644 000765 000024 00000007300 13032306506 023133 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $min;
my $max;
my $width;
my $format;
my $hidden;
my $level;
my $collapsed;
###############################################################################
#
# 1. Test the _write_col_info() method.
#
$min = 1;
$max = 3;
$width = 5;
$format = undef;
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_col_info() method.
#
$min = 5;
$max = 5;
$width = 8;
$format = undef;
$hidden = 1;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_col_info() method.
#
$min = 7;
$max = 7;
$width = undef;
$format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_col_info() method.
#
$min = 8;
$max = 8;
$width = 8.43;
$format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_col_info() method.
#
$min = 9;
$max = 9;
$width = 2;
$format = undef;
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_col_info() method.
#
$min = 11;
$max = 11;
$width = undef;
$format = undef;
$hidden = 1;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_conditional_formatting.t 000644 000765 000024 00000006155 13032306506 026107 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( \{}, \{} );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '5';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '30';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A2',
{
type => 'cell',
format => $format,
criteria => 'less than',
value => 30
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '50';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A3',
{
type => 'cell',
format => undef,
criteria => '>=',
value => 50
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '1020';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'between',
minimum => 10,
maximum => 20,
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_custom_filter.t 000644 000765 000024 00000001506 13032306506 024224 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_custom_filter() method.
#
$caption = " \tWorksheet: _write_custom_filter()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filter( 4, 3000 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_custom_filters.t 000644 000765 000024 00000002467 13032306506 024416 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_custom_filters() method.
#
$caption = " \tWorksheet: _write_custom_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filters( 4, 4000 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_custom_filters() method.
#
$caption = " \tWorksheet: _write_custom_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filters( 4, 3000, 0, 1, 8000 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_data_validations_01.t 000644 000765 000024 00000015017 13032306506 025155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet data validation methods.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Data validation example 1 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A1',
{
validate => 'integer',
criteria => '>',
value => 0,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 1 from docs (with options turned off).
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A1',
{
validate => 'integer',
criteria => '>',
value => 0,
ignore_blank => 0,
show_input => 0,
show_error => 0,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 2 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = 'E3';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A2',
{
validate => 'integer',
criteria => '>',
value => '=E3',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 3 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0.10.5';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A3',
{
validate => 'decimal',
criteria => 'between',
minimum => 0.1,
maximum => 0.5,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 4 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '"open,high,close"';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A4',
{
validate => 'list',
source => [ 'open', 'high', 'close' ],
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 5 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '$E$4:$G$4';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A5',
{
validate => 'list',
source => '=$E$4:$G$4',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 6 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '3944839794';
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->data_validation(
'A6',
{
validate => 'date',
criteria => 'between',
minimum => '2008-01-01T',
maximum => '2008-12-12T',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 7 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '1100';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A7',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 100,
input_title => 'Enter an integer:',
input_message => 'between 1 and 100',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_data_validations_02.t 000644 000765 000024 00000075751 13032306506 025171 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet data validation methods.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 45;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test 1 Integer between 1 and 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer between";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 2 Integer not between 1 and 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'not between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer not between";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 3,4,5 Integer == 1.
#
for my $operator ( 'equal to', '=', '==' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer equal to";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 6,7,8 Integer != 1.
#
for my $operator ( 'not equal to', '<>', '!=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer not equal to";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 9,10 Integer > 1.
#
for my $operator ( 'greater than', '>' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer >";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 11,12 Integer < 1.
#
for my $operator ( 'less than', '<' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer <";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 13,14 Integer >= 1.
#
for my $operator ( 'greater than or equal to', '>=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer >=";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 15,16 Integer <= 1.
#
for my $operator ( 'less than or equal to', '<=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer <=";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 17 Integer between 1 and 10 (same as test 1) + Ignore blank off.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
ignore_blank => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: ignore blank off";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 18 Integer between 1 and 10 (same as test 1) + Error style == warning..
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
error_type => 'warning',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: error style = warning";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 19 Integer between 1 and 10 (same as test 1) + Error style == infor..
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
error_type => 'information',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: error style = information";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 20 Integer between 1 and 10 (same as test 1)
# + input title.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: with input title";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 21 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + input message";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 22 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + error title";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 23 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + error message";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 24 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
# - input message box.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
show_input => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: no input box";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 25 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
# - input message box.
# - error message box.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
show_input => 0,
show_error => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: no error box";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 26 'Any' value on its own shouldn't produce a DV record.
#
$got = '';
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation( 'B5', { validate => 'any', } );
$worksheet->_write_data_validations();
$caption = " \tData validation api: any validation";
$expected = '';
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 27 Decimal = 1.2345
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'decimal',
criteria => '==',
value => 1.2345,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: decimal validation";
$expected = '1.2345';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 28 List = a,bb,ccc
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'list',
source => [ 'a', 'bb', 'ccc' ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: explicit list";
$expected = '"a,bb,ccc"';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 29 List = a,bb,ccc, No dropdown
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'list',
source => [ 'a', 'bb', 'ccc' ],
dropdown => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: list with no dropdown";
$expected = '"a,bb,ccc"';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 30 List = $D$1:$D$5
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'A1:A1',
{
validate => 'list',
source => '=$D$1:$D$5',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: list with range";
$expected = '$D$1:$D$5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 31 Date = 39653 (2008-07-24)
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => '==',
value => 39653,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date";
$expected = '39653';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 32 Date = 2008-07-24T
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_date_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => '==',
value => '2008-07-24T',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date auto";
$expected = '39653';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 33 Date between ranges.
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_date_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => 'between',
minimum => '2008-01-01T',
maximum => '2008-12-12T',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date auto, between";
$expected = '3944839794';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 34 Time = 0.5 (12:00:00)
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5:B5',
{
validate => 'time',
criteria => '==',
value => 0.5,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: time";
$expected = '0.5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 35 Time = T12:00:00
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_date_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'time',
criteria => '==',
value => 'T12:00:00',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: time auto";
$expected = '0.5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 36 Custom == 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'Custom',
criteria => '==',
value => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: custom";
$expected = '10';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 37 Check the row/col processing: single A1 style cell.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 38 Check the row/col processing: single A1 style range.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5:B10',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 39 Check the row/col processing: single (row, col) style cell.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 40 Check the row/col processing: single (row, col) style range.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1, 9, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 41 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 4, 3, 4, 3 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 42 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 6, 1, 6, 1 ], [ 8, 1, 8, 1 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 43 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1, 8, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 3, 3, 3, 3 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 44 Multiple validations.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => '>',
value => 10,
}
);
$worksheet->data_validation(
'C10',
{
validate => 'integer',
criteria => '<',
value => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: multiple validations";
$expected = '1010';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 45 'any' with an input message should produce a dataValidation record.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'any',
input_title => 'Input title January',
input_message => 'Input message February',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: input message only";
$expected = '';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_dimension.t 000644 000765 000024 00000011324 13032306506 023331 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 10;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $cell_ref;
###############################################################################
#
# 1. Test the _write_dimension() method with no dimensions set.
#
$caption = " \tWorksheet: _write_dimension(undef)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'XFD1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'XFD1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:B2';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'A1', 'some string' );
$worksheet->write( 'B2', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:B2';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'B2', 'some string' );
$worksheet->write( 'A1', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'B2:H11';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'B2', 'some string' );
$worksheet->write( 'H11', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:XFD1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'A1', 'some string' );
$worksheet->write( 'XFD1048576', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_filter.t 000644 000765 000024 00000001422 13032306506 022627 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filter() method.
#
$caption = " \tWorksheet: _write_filter()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filter( 'East' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_filter_column.t 000644 000765 000024 00000001553 13032306506 024211 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filter_column() method.
#
$caption = " \tWorksheet: _write_filter_column()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_filter_column( 0, 1, ['East'] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_filters.t 000644 000765 000024 00000002720 13032306506 023014 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'East' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'East', 'South' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'blanks' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_header_footer.t 000644 000765 000024 00000004757 13032306506 024166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_odd_header() method.
#
$caption = " \tWorksheet: _write_odd_header()";
$expected = 'Page &P of &N';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->_write_odd_header();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_odd_footer() method.
#
$caption = " \tWorksheet: _write_odd_footer()";
$expected = '&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('&F');
$worksheet->_write_odd_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Header only.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = 'Page &P of &N';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Footer only.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = '&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('&F');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Header and footer.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = 'Page &P of &N&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->set_footer('&F');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_hyperlink.t 000644 000765 000024 00000004140 13032306506 023347 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_hyperlink_external() method.
#
$caption = " \tWorksheet: _write_hyperlink_external()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_external( 0, 0, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 0, 0, 'Sheet2!A1', 'Sheet2!A1' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = q();
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 4, 0, "'Data Sheet'!D5", "'Data Sheet'!D5" );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 17, 0, 'Sheet2!A1', 'Sheet2!A1', 'Screen Tip 1' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_legacy_drawing.t 000644 000765 000024 00000001512 13032306506 024321 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_legacy_drawing() method.
#
$caption = " \tWorksheet: _write_legacy_drawing()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_has_vml} = 1;
$worksheet->_write_legacy_drawing();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_merge_cell.t 000644 000765 000024 00000001451 13032306506 023442 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_merge_cell() method.
#
$caption = " \tWorksheet: _write_merge_cell()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_merge_cell( [ 2, 1, 2, 2 ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_merge_cells.t 000644 000765 000024 00000003611 13032306506 023625 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Excel::Writer::XLSX::Format;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( 0 );
###############################################################################
#
# Test the _write_merge_cells() method. With $row, $col notation.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 2, 1, 2, 2, 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_merge_cells() method. With A1 notation.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_merge_cells() method. With more than one range.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->merge_range( 'A2:D2', 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_page_margins.t 000644 000765 000024 00000012007 13032306506 023777 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 11;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins_LR(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins_TB(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_left(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_right(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_top(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_bottom(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('', 0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('', 0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Test numeric value with whitespace.
$worksheet->set_margins( " 0.5\n");
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_page_set_up_pr.t 000644 000765 000024 00000001510 13032306506 024334 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_set_up_pr() method.
#
$caption = " \tWorksheet: _write_page_set_up_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_fit_page} = 1;
$worksheet->_write_page_set_up_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_page_setup.t 000644 000765 000024 00000004542 13032306506 023504 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_setup() method. Without any page setup.
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
$got = ''; # Reset after previous undef value;
###############################################################################
#
# Test the _write_page_setup() method. With set_landscape();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_landscape();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With set_portrait();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_portrait();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With set_paper();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_paper( 9 );
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With print_across();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->print_across();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_pane.t 000644 000765 000024 00000013363 13032306506 022274 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 14;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1, 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1, 0, 19 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 3, 6, 3, 6, 1);
$worksheet->_write_panes();
is( $got, $expected, $caption );
# Split panes tests.
###############################################################################
#
# 7. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 15 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 30 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 105 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 11. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 17.57 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 12. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 45 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 13. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 15, 8.43 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 14. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_phonetic_pr.t 000644 000765 000024 00000001464 13032306506 023662 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_phonetic_pr() method.
#
$caption = " \tWorksheet: _write_phonetic_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_phonetic_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_print_options.t 000644 000765 000024 00000006551 13032306506 024261 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_print_options() method. Without any options.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->_write_print_options();
is( $got, $expected, $caption );
$got = ''; # Reset after previous undef value;
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_horizontally();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_vertically();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_horizontally();
$worksheet->center_vertically();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines(0);
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines();
$worksheet->_write_print_options(1);
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines(0);
$worksheet->_write_print_options(2);
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_row.t 000644 000765 000024 00000006201 13032306506 022151 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
###############################################################################
#
# 1. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 0 );
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 2, '2:2' );
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 1, undef, 30 );
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 3, undef, undef, undef, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 6, undef, undef, $format );
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 9, undef, 3 );
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 12, undef, 24, undef, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_empty_row() method.
#
$caption = " \tWorksheet: _write_empty_row()";
$expected = '
';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_empty_row( 12, undef, 24, undef, 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_row_breaks.t 000644 000765 000024 00000002543 13032306506 023505 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_row_breaks() method.
#
$caption = " \tWorksheet: _write_row_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_hbreaks} = [1];
$worksheet->_write_row_breaks();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_row_breaks() method.
#
$caption = " \tWorksheet: _write_row_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_hbreaks} = [15, 7, 3, 0];
$worksheet->_write_row_breaks();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_selection.t 000644 000765 000024 00000001474 13032306506 023336 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_selection() method.
#
$caption = " \tWorksheet: _write_selection()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_selection( undef, 'A1', 'A1' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_calc_pr.t 000644 000765 000024 00000001457 13032306506 024145 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_calc_pr() method.
#
$caption = " \tWorksheet: _write_sheet_calc_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_calc_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_data.t 000644 000765 000024 00000001421 13032306506 023442 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_data() method.
#
$caption = " \tWorksheet: _write_sheet_data()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_data();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_format_pr.t 000644 000765 000024 00000001472 13032306506 024530 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_format_pr() method.
#
$caption = " \tWorksheet: _write_sheet_format_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_format_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_pr.t 000644 000765 000024 00000003445 13032306506 023162 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_fit_page} = 1;
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->set_tab_color( 'red' );
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->{_fit_page} = 1;
$worksheet->set_tab_color( 'red' );
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_protection.t 000644 000765 000024 00000023222 13032306506 024722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $password;
my %options;
###############################################################################
#
# 1. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ();
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = 'password';
%options = ();
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( select_locked_cells => 0 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_cells => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_hyperlinks => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( delete_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 11. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( delete_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 12. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( sort => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 13. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( autofilter => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 14. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( pivot_tables => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 15. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( objects => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 16. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( scenarios => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 17. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_cells => 1, select_locked_cells => 0, select_unlocked_cells => 0 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 18. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = 'drowssap';
%options = (
objects => 1,
scenarios => 1,
format_cells => 1,
format_columns => 1,
format_rows => 1,
insert_columns => 1,
insert_rows => 1,
insert_hyperlinks => 1,
delete_columns => 1,
delete_rows => 1,
select_locked_cells => 0,
sort => 1,
autofilter => 1,
pivot_tables => 1,
select_unlocked_cells => 0,
);
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_view.t 000644 000765 000024 00000005701 13032306506 023510 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_view() method. Tab not selected.
#
$caption = " \tWorksheet: _write_sheet_view()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected.
#
$caption = " \tWorksheet: _write_sheet_view()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines();
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(0)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 0 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(1)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 1 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(2)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 2 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views1.t 000644 000765 000024 00000006133 13032306506 023754 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_sheet_views() method.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_zoom( 100 ); # Default. Should be ignored.
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method. With zoom.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_zoom( 200 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method. Right to left.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->right_to_left();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method. Hide zeroes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_zero();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method. Set page view mode.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_page_view();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views2.t 000644 000765 000024 00000007274 13032306506 023764 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 1, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 3, 6, 3, 6, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views3.t 000644 000765 000024 00000012200 13032306506 023746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes tests.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 30 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 105 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 17.57 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 45 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views4.t 000644 000765 000024 00000012360 13032306506 023756 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Repeat of tests in sub_write_sheet_views3.t with explicit topLeft cells.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 0, 1, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 30, 0, 2, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 105, 0, 7, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 8.43, 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 17.57, 0, 2 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 45, 0, 5 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 8.43, 1, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 45, 54.14, 3, 6 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views5.t 000644 000765 000024 00000007754 13032306506 023772 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 7;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test for set_selection().
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'D3' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'D3:F4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'F4:D3' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2:A2' ); # Should be the same as 'A2'
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views6.t 000644 000765 000024 00000006471 13032306506 023766 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes with selection.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->freeze_panes( 1, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I5' );
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views7.t 000644 000765 000024 00000010714 13032306506 023762 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes with shifted top left cell.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->freeze_panes( 1 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 1 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->freeze_panes( 0 , 1, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 0 , 1, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->freeze_panes( 3, 6, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 3, 6, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views8.t 000644 000765 000024 00000006423 13032306506 023765 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes with selection.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->split_panes( 15, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I5' );
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_sheet_views9.t 000644 000765 000024 00000011160 13032306506 023760 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes with shifted top left cell.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->split_panes( 15 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A21' );
$worksheet->split_panes( 15 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->split_panes( 0, 8.43, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'E1' );
$worksheet->split_panes( 0, 8.43, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
TODO. The following are edge cases. They will probably need a change of API
to fix since the current API doesn't pass in enough information.
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->split_panes( 45, 54.14, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I7' );
$worksheet->split_panes( 45, 54.14, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_tab_color.t 000644 000765 000024 00000001626 13032306506 023314 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_tab_color() method.
#
$caption = " \tWorksheet: _write_tab_color()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_tab_color} = 0x0A;
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->_write_tab_color( );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_worksheet.t 000644 000765 000024 00000001635 13032306506 023363 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_worksheet() method.
#
$caption = " \tWorksheet: _write_worksheet()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_worksheet();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/sub_write_xml_declaration.t 000644 000765 000024 00000001472 13032306506 024514 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the xml_declaration() method.
#
$caption = " \tWorksheet: xml_declaration()";
$expected = qq(\n);
$worksheet = _new_worksheet(\$got);
$worksheet->xml_declaration();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_01.t 000644 000765 000024 00000002550 13032306506 021575 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_02.t 000644 000765 000024 00000002752 13032306506 021602 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->write('B3', 123);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
123
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_03.t 000644 000765 000024 00000004003 13032306506 021572 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test column formatting.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1, bold => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_column( 'B:D', 5 );
$worksheet->set_column( 'F:F', 8, undef, 1 );
$worksheet->set_column( 'H:H', undef, $format );
$worksheet->set_column( 'J:J', 2 );
$worksheet->set_column( 'L:L', undef, undef, 1 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_04.t 000644 000765 000024 00000003652 13032306506 021604 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test row formatting.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1, bold => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_row( 1, 30 );
$worksheet->set_row( 3, undef, undef, 1 );
$worksheet->set_row( 6, undef, $format );
$worksheet->set_row( 9, 3 );
$worksheet->set_row( 12, 24, undef, 1 );
$worksheet->set_row( 14, 0 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_array_formula_01.t 000644 000765 000024 00000005462 13032306506 024525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test array formulas.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->write( 'B1', [ [ 500, 10 ], [ 300, 15 ] ] );
$worksheet->write( 'B5', [ [ 1, 2, 3 ], [ 20234, 21003, 10000 ] ] );
$worksheet->write( 'A1', '{=SUM(B1:C1*B2:C2)}', $format, 9500 );
$worksheet->write_array_formula( 'A2:A2', '{=SUM(B1:C1*B2:C2)}', $format, 9500 );
$worksheet->write_array_formula( 'A5:A7', '{=TREND(C5:C7,B5:B7)}', $format, 22196 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
SUM(B1:C1*B2:C2)
9500
500
300
SUM(B1:C1*B2:C2)
9500
10
15
TREND(C5:C7,B5:B7)
22196
1
20234
0
2
21003
0
3
10000
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_01.t 000644 000765 000024 00000004337 13032306506 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => undef,
criteria => 'greater than',
value => 5,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
5
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_02.t 000644 000765 000024 00000004463 13032306506 024156 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->write( 'B1', 5 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => undef,
criteria => 'greater than',
value => '$B$1',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
5
20
30
40
$B$1
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_03.t 000644 000765 000024 00000005135 13032306506 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'cell',
format => undef,
criteria => 'between',
minimum => 20,
maximum => 30,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'cell',
format => undef,
criteria => 'not between',
minimum => 20,
maximum => 30,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
20
30
20
30
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_04.t 000644 000765 000024 00000004436 13032306506 024160 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'duplicate',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'unique',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_05.t 000644 000765 000024 00000010165 13032306506 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'equal or above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'equal or below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '1 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '1 std dev below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '2 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '2 std dev below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '3 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '3 std dev below',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_06.t 000644 000765 000024 00000005451 13032306506 024160 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'top',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'bottom',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'top',
criteria => '%',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'bottom',
criteria => '%',
value => 10,
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_07.t 000644 000765 000024 00000006276 13032306506 024167 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'containing',
value => 'foo',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'not containing',
value => 'foo',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'b',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'b',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
NOT(ISERROR(SEARCH("foo",A1)))
ISERROR(SEARCH("foo",A1))
LEFT(A1,1)="b"
RIGHT(A1,1)="b"
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_08.t 000644 000765 000024 00000012250 13032306506 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'yesterday',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'today',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'tomorrow',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last 7 days',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'this week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'next week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last month',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'this month',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'next month',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
FLOOR(A1,1)=TODAY()-1
FLOOR(A1,1)=TODAY()
FLOOR(A1,1)=TODAY()+1
AND(TODAY()-FLOOR(A1,1)<=6,FLOOR(A1,1)<=TODAY())
AND(TODAY()-ROUNDDOWN(A1,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(A1,0)<(WEEKDAY(TODAY())+7))
AND(TODAY()-ROUNDDOWN(A1,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(A1,0)-TODAY()<=7-WEEKDAY(TODAY()))
AND(ROUNDDOWN(A1,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(A1,0)-TODAY()<(15-WEEKDAY(TODAY())))
AND(MONTH(A1)=MONTH(TODAY())-1,OR(YEAR(A1)=YEAR(TODAY()),AND(MONTH(A1)=1,YEAR(A1)=YEAR(TODAY())-1)))
AND(MONTH(A1)=MONTH(TODAY()),YEAR(A1)=YEAR(TODAY()))
AND(MONTH(A1)=MONTH(TODAY())+1,OR(YEAR(A1)=YEAR(TODAY()),AND(MONTH(A1)=12,YEAR(A1)=YEAR(TODAY())+1)))
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_09.t 000644 000765 000024 00000005520 13032306506 024160 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'blanks',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'no_blanks',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'errors',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'no_errors',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
LEN(TRIM(A1))=0
LEN(TRIM(A1))>0
ISERROR(A1)
NOT(ISERROR(A1))
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_10.t 000644 000765 000024 00000004424 13032306506 024152 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'date',
criteria => 'greater than',
value => '2011-01-01T',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
40544
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_11.t 000644 000765 000024 00000004515 13032306506 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'date',
criteria => 'between',
minimum => '2011-01-01T',
maximum => '2011-12-31T',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
40544
40908
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_12.t 000644 000765 000024 00000006331 13032306506 024153 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '2_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_13.t 000644 000765 000024 00000006444 13032306506 024161 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_14.t 000644 000765 000024 00000006253 13032306506 024160 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => 'data_bar',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_15.t 000644 000765 000024 00000005672 13032306506 024165 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
my $format = undef;
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$1>5',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$2<80',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '"1+2"',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$3>$A$4',
format => $format,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
$A$1>5
$A$2<80
"1+2"
$A$3>$A$4
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_16.t 000644 000765 000024 00000006605 13032306506 024163 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
min_color => "#C5D9F1",
mid_color => "#8DB4E3",
max_color => "#538ED5",
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_17.t 000644 000765 000024 00000006735 13032306506 024170 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
min_value => '$A$10',
mid_value => 52,
max_value => 99,
min_type => 'num',
mid_type => 'percent',
max_type => 'percentile',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_18.t 000644 000765 000024 00000006526 13032306506 024167 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( '=$A$3:$A$4,A1 , A6:$A$8 ,$A10 , A$12',
{
type => '3_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_19.t 000644 000765 000024 00000006656 13032306506 024174 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_date_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => 'data_bar',
min_value => 5,
mid_value => 52, # Should be ignored.
max_value => 90,
min_type => 'num',
mid_type => 'percentile', # Should be ignored.
max_type => 'percent',
bar_color => '#8DB4E3',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_20.t 000644 000765 000024 00000006220 13032306506 024147 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'b',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'bc',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'z',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'yz',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
LEFT(A1,1)="b"
LEFT(A1,2)="bc"
RIGHT(A1,1)="z"
RIGHT(A1,2)="yz"
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_21.t 000644 000765 000024 00000004324 13032306506 024153 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => undef,
criteria => 'greater than',
value => 5,
stop_if_true => 1,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
5
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_22.t 000644 000765 000024 00000014731 13157023155 024163 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->conditional_formatting( 'A1',
{
type => 'icon_set',
icon_style => '3_arrows',
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'icon_set',
icon_style => '3_flags',
}
);
$worksheet->conditional_formatting( 'A3',
{
type => 'icon_set',
icon_style => '3_traffic_lights_rimmed',
}
);
$worksheet->conditional_formatting( 'A4',
{
type => 'icon_set',
icon_style => '3_symbols_circled',
}
);
$worksheet->conditional_formatting( 'A5',
{
type => 'icon_set',
icon_style => '4_arrows',
}
);
$worksheet->conditional_formatting( 'A6',
{
type => 'icon_set',
icon_style => '4_red_to_black',
}
);
$worksheet->conditional_formatting( 'A7',
{
type => 'icon_set',
icon_style => '4_traffic_lights',
}
);
$worksheet->conditional_formatting( 'A8',
{
type => 'icon_set',
icon_style => '5_arrows_gray',
}
);
$worksheet->conditional_formatting( 'A9',
{
type => 'icon_set',
icon_style => '5_quarters',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_23.t 000644 000765 000024 00000013542 13157023155 024163 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->conditional_formatting( 'A1',
{
type => 'icon_set',
icon_style => '3_arrows_gray',
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'icon_set',
icon_style => '3_traffic_lights',
}
);
$worksheet->conditional_formatting( 'A3',
{
type => 'icon_set',
icon_style => '3_signs',
}
);
$worksheet->conditional_formatting( 'A4',
{
type => 'icon_set',
icon_style => '3_symbols',
}
);
$worksheet->conditional_formatting( 'A5',
{
type => 'icon_set',
icon_style => '4_arrows_gray',
}
);
$worksheet->conditional_formatting( 'A6',
{
type => 'icon_set',
icon_style => '4_ratings',
}
);
$worksheet->conditional_formatting( 'A7',
{
type => 'icon_set',
icon_style => '5_arrows',
}
);
$worksheet->conditional_formatting( 'A8',
{
type => 'icon_set',
icon_style => '5_ratings',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_cond_format_24.t 000644 000765 000024 00000017504 13157023155 024166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A12', 75 );
$worksheet->conditional_formatting( 'A1',
{
type => 'icon_set',
icon_style => '3_arrows',
reverse_icons => 1,
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'icon_set',
icon_style => '3_flags',
icons_only => 1,
}
);
$worksheet->conditional_formatting( 'A3',
{
type => 'icon_set',
icon_style => '3_traffic_lights_rimmed',
icons_only => 1,
reverse_icons => 1,
}
);
$worksheet->conditional_formatting( 'A4',
{
type => 'icon_set',
icon_style => '3_symbols_circled',
icons => [ {value => 80},
{value => 20},
],
}
);
$worksheet->conditional_formatting( 'A5',
{
type => 'icon_set',
icon_style => '4_arrows',
icons => [ {criteria => '>'},
{criteria => '>'},
{criteria => '>'},
],
}
);
$worksheet->conditional_formatting( 'A6',
{
type => 'icon_set',
icon_style => '4_red_to_black',
icons => [ {criteria => '>=', type => 'number', value => 90},
{criteria => '<', type => 'percentile', value => 50},
{criteria => '<=', type => 'percent', value => 25},
],
}
);
$worksheet->conditional_formatting( 'A7',
{
type => 'icon_set',
icon_style => '4_traffic_lights',
icons => [ {value => '=$A$12'} ],
}
);
$worksheet->conditional_formatting( 'A8',
{
type => 'icon_set',
icon_style => '5_arrows_gray',
icons => [ {type => 'formula', value => '=$A$12'} ],
}
);
$worksheet->conditional_formatting( 'A9',
{
type => 'icon_set',
icon_style => '5_quarters',
icons => [ { type => 'percentile', value => 70 },
{ type => 'percentile', value => 50 },
{ type => 'percentile', value => 30 },
{ type => 'percentile', value => 10 },
{ type => 'percentile', value => -1 },
],
reverse_icons => 1,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
75
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_merge_cells_01.t 000644 000765 000024 00000003312 13032306506 024133 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
0
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_merge_cells_02.t 000644 000765 000024 00000003755 13032306506 024147 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format1 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
my $format2 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 2 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->merge_range( 'B3:C3', 'Foo', $format1);
$worksheet->merge_range( 'A2:D2', undef, $format2);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
0
Excel-Writer-XLSX-0.96/t/worksheet/worksheet_merge_cells_03.t 000644 000765 000024 00000007003 13032306506 024136 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format1 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
my $format2 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 2 );
my $format3 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 3 );
$worksheet = _new_worksheet(\$got);
$worksheet->set_column('B:C', 12);
$worksheet->{_date_1904} = 0;
$worksheet->select();
$worksheet->merge_range_type( 'formula', 'B14:C14', '=1+2', $format1, 3 );
$worksheet->merge_range_type( 'number', 'B2:C2', 123, $format1 );
$worksheet->merge_range_type( 'string', 'B4:C4', 'foo', $format1 );
$worksheet->merge_range_type( 'blank', 'B6:C6', $format1 );
$worksheet->merge_range_type( 'rich_string', 'B8:C8', 'This is ', $format2, 'bold', $format1 );
$worksheet->merge_range_type( 'date_time', 'B10:C10', '2011-01-01T', $format2 );
$worksheet->merge_range_type( 'url', 'B12:C12', 'http://www.perl.com/', $format3 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
123
0
1
40544
2
1+2
3
Excel-Writer-XLSX-0.96/t/workbook/sub_close.t 000644 000765 000024 00000001737 13032306506 021070 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $filename = 'sub_close.xlsx';
my $dir = 't/regression/';
my $ext_filename = $dir . $filename;
my $scalar_target;
###############################################################################
#
# Test the close() method.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $ext_filename );
$workbook->add_worksheet();
ok( $workbook->close(), "\tWorkbook: close(), _internal_fh" );
unlink $ext_filename;
open( my $fh, '>', \$scalar_target );
$workbook = Excel::Writer::XLSX->new( $fh );
$workbook->add_worksheet();
ok( $workbook->close(), "\tWorkbook: close(), not _internal_fh" );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_get_chart_range.t 000644 000765 000024 00000006255 13032306506 023077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_workbook);
use strict;
use warnings;
use Test::More tests => 7;
###############################################################################
#
# Tests setup.
#
my @expected;
my @got;
my $formula;
my $tmp_str = '';
my $caption;
my $workbook;
###############################################################################
#
# Test the _get_chart_range() method. Simple formula.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1:$B$5);
@expected = ( 'Sheet1', 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with space.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('Sheet 1'!$B$1:$B$5);
@expected = ( q(Sheet 1), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Singe cell range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1);
@expected = ( 'Sheet1', 0, 1, 0, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with an apostrophe.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('Don''t'!$B$1:$B$5);
@expected = ( q(Don't), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with exclamation mark.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('aa!bb'!$B$1:$B$5);
@expected = ( q(aa!bb), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Invalid range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = '';
@expected = ( undef );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Invalid 2D range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1:$F$5);
@expected = ( undef );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_sort_defined_names.t 000644 000765 000024 00000006076 13032306506 023614 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_is_deep_diff';
use strict;
use warnings;
use Excel::Writer::XLSX::Workbook;
use Test::More tests => 2;
my $unsorted = [
[ "Bar", 1, q(Sheet2!$A$1) ],
[ "Bar", 0, q(Sheet1!$A$1) ],
[ "Abc", -1, q(Sheet1!$A$1) ],
[ "Baz", -1, 0.98 ],
[ "Bar", 2, q('Sheet 3'!$A$1) ],
[ "Foo", -1, q(Sheet1!$A$1) ],
[ "Print_Titler", -1, q(Sheet1!$A$1) ],
[ "Print_Titlet", -1, q(Sheet1!$A$1) ],
[ "_Fog", -1, q(Sheet1!$A$1) ],
[ "_Egg", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Titles", 0, q(Sheet1!$1:$1) ],
[ "_xlnm._FilterDatabase", 0, q(Sheet1!$G$1) ],
[ "aaa", 1, q(Sheet2!$A$1) ],
[ "_xlnm.Print_Area", 0, q(Sheet1!$A$1:$H$10) ],
[ "Car", 2, q("Saab 900") ],
];
my $expected = [
[ "_Egg", -1, q(Sheet1!$A$1) ],
[ "_xlnm._FilterDatabase", 0, q(Sheet1!$G$1) ],
[ "_Fog", -1, q(Sheet1!$A$1) ],
[ "aaa", 1, q(Sheet2!$A$1) ],
[ "Abc", -1, q(Sheet1!$A$1) ],
[ "Bar", 2, q('Sheet 3'!$A$1) ],
[ "Bar", 0, q(Sheet1!$A$1) ],
[ "Bar", 1, q(Sheet2!$A$1) ],
[ "Baz", -1, 0.98 ],
[ "Car", 2, q("Saab 900") ],
[ "Foo", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Area", 0, q(Sheet1!$A$1:$H$10) ],
[ "Print_Titler", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Titles", 0, q(Sheet1!$1:$1) ],
[ "Print_Titlet", -1, q(Sheet1!$A$1) ],
];
my @sorted = Excel::Writer::XLSX::Workbook::_sort_defined_names(@$unsorted);
my $got = \@sorted;
_is_deep_diff( $got, $expected );
#
# Also test the named ranges required by App generated from the sorted list.
#
my $named_ranges = [
q(_Egg),
q(_Fog),
q(Sheet2!aaa),
q(Abc),
q('Sheet 3'!Bar),
q(Sheet1!Bar),
q(Sheet2!Bar),
q(Foo),
q(Sheet1!Print_Area),
q(Print_Titler),
q(Sheet1!Print_Titles),
q(Print_Titlet),
];
$got = Excel::Writer::XLSX::Workbook::_extract_named_ranges(@sorted);
_is_deep_diff( $got, $named_ranges );
__END__
_Egg
_Fog
Sheet2!aaa
Abc
'Sheet 3'!Bar
Sheet1!Bar
Sheet2!Bar
Foo
Sheet1!Print_Area
Print_Titler
Sheet1!Print_Titles
Print_Titlet
Excel-Writer-XLSX-0.96/t/workbook/sub_write_book_views.t 000644 000765 000024 00000001547 13032306506 023343 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_book_views() method.
#
$caption = " \tWorkbook: _write_book_views()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_book_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_calc_pr.t 000644 000765 000024 00000004012 13032306506 022565 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_calc_pr() method.
#
$caption = " \tWorkbook: _write_calc_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_calc_pr();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_calc_pr() method with the calculation mode set to
# auto_except_tables.
#
$caption = " \tWorkbook: _write_calc_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_calc_mode('auto_except_tables');
$workbook->_write_calc_pr();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_calc_pr() method with the calculation mode set to manual.
#
$caption = " \tWorkbook: _write_calc_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_calc_mode('manual');
$workbook->_write_calc_pr();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_calc_pr() method with non-default calc id.
#
$caption = " \tWorkbook: _write_calc_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_calc_mode('auto', 12345);
$workbook->_write_calc_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_defined_name.t 000644 000765 000024 00000001600 13032306506 023560 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_defined_name() method.
#
$caption = " \tWorkbook: _write_defined_name()";
$expected = 'Sheet1!$1:$1';
$workbook = _new_workbook(\$got);
$workbook->_write_defined_name( [ '_xlnm.Print_Titles', 0, 'Sheet1!$1:$1' ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_defined_names.t 000644 000765 000024 00000005060 13032306506 023747 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_workbook _is_deep_diff _got_to_aref);
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_defined_names() method.
#
$caption = " \tWorkbook: _write_defined_names()";
$expected = 'Sheet1!$1:$1';
$workbook = _new_workbook(\$got);
$workbook->{_defined_names} = [ [ '_xlnm.Print_Titles', 0, 'Sheet1!$1:$1' ] ];
$workbook->_write_defined_names();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_defined_names() method.
#
$caption = " \tWorkbook: _write_defined_names()";
$expected = q(Sheet1!$A$1Sheet1!$A$1Sheet2!$A$1Sheet1!$A$1'Sheet 3'!$A$1Sheet1!$A$1Sheet2!$A$10.98"Saab 900");
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->add_worksheet();
$workbook->add_worksheet('Sheet 3');
$workbook->define_name( q('Sheet 3'!Bar), q(='Sheet 3'!$A$1) );
$workbook->define_name( q(Abc), q(=Sheet1!$A$1) );
$workbook->define_name( q(Baz), q(=0.98) );
$workbook->define_name( q(Sheet1!Bar), q(=Sheet1!$A$1) );
$workbook->define_name( q(Sheet2!Bar), q(=Sheet2!$A$1) );
$workbook->define_name( q(Sheet2!aaa), q(=Sheet2!$A$1) );
$workbook->define_name( q('Sheet 3'!car), q(="Saab 900") );
$workbook->define_name( q(_Egg), q(=Sheet1!$A$1) );
$workbook->define_name( q(_Fog), q(=Sheet1!$A$1) );
$workbook->_prepare_defined_names();
$workbook->_write_defined_names();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_ext.t 000644 000765 000024 00000001613 13032306506 021766 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_ext() method.
#
$caption = " \tWorkbook: _write_ext()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_ext();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_ext_lst.t 000644 000765 000024 00000001650 13032306506 022651 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_ext_lst() method.
#
$caption = " \tWorkbook: _write_ext_lst()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_ext_lst();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_file_version.t 000644 000765 000024 00000001526 13032306506 023655 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_file_version() method.
#
$caption = " \tWorkbook: _write_file_version()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_file_version();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_mx_arch_id.t 000644 000765 000024 00000001424 13032306506 023263 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_mx_arch_id() method.
#
$caption = " \tWorkbook: _write_mx_arch_id()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_mx_arch_id();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_sheet.t 000644 000765 000024 00000003024 13032306506 022274 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_sheet() method.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Sheet1', 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet() method. Hidden worksheet.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Sheet1', 1, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet() method. Sheetname with XML character.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Bits & Bobs', 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_sheets.t 000644 000765 000024 00000001535 13032306506 022464 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_sheets() method.
#
$caption = " \tWorkbook: _write_sheets()";
$expected = '';
$workbook = _new_workbook(\$got);
my $worksheet = $workbook->add_worksheet();
$workbook->_write_sheets();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_workbook.t 000644 000765 000024 00000001622 13032306506 023023 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook() method.
#
$caption = " \tWorkbook: _write_workbook()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_workbook_pr.t 000644 000765 000024 00000001453 13032306506 023526 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook_pr() method.
#
$caption = " \tWorkbook: _write_workbook_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_workbook_view.t 000644 000765 000024 00000007562 13032306506 024066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook_view() method.
#
$caption = " \tWorkbook: _write_workbook_view() 1";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method. Second tab selected.
#
$caption = " \tWorkbook: _write_workbook_view() 2";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->{_activesheet} = 1;
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method. Second tab selected. First sheet set.
#
$caption = " \tWorkbook: _write_workbook_view() 3";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->{_firstsheet} = 1;
$workbook->{_activesheet} = 1;
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method with set_size().
#
$caption = " \tWorkbook: _write_workbook_view() 4";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_size();
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method with set_size().
#
$caption = " \tWorkbook: _write_workbook_view() 5";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_size(0, 0);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method with set_size().
#
$caption = " \tWorkbook: _write_workbook_view() 6";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_size(1073, 644);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method with set_size().
#
$caption = " \tWorkbook: _write_workbook_view() 7";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_size(123, 70);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method with set_size().
#
$caption = " \tWorkbook: _write_workbook_view() 8";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->set_size(719, 490);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/sub_write_xml_declaration.t 000644 000765 000024 00000001463 13032306506 024336 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the xml_declaration() method.
#
$caption = " \tWorkbook: xml_declaration()";
$expected = qq(\n);
$workbook = _new_workbook(\$got);
$workbook->xml_declaration();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/workbook/workbook_01.t 000644 000765 000024 00000002720 13032306506 021240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/workbook/workbook_02.t 000644 000765 000024 00000003036 13032306506 021242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->add_worksheet();
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/workbook/workbook_03.t 000644 000765 000024 00000003116 13032306506 021242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet('Non Default Name');
$workbook->add_worksheet('Another Name');
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.96/t/workbook/workbook_get_worksheet_by_name.t 000644 000765 000024 00000002427 13032306506 025370 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), MAy 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the get_worksheet_by_name() method.
#
$caption = " \tWorkbook: get_worksheet_by_name()";
$workbook = _new_workbook(\$got);
# Test a valid implicit name.
$expected = $workbook->add_worksheet();
$got = $workbook->get_worksheet_by_name('Sheet1');
is($got, $expected, $caption);
# Test a valid explicit name.
$expected = $workbook->add_worksheet('Sheet 2');
$got = $workbook->get_worksheet_by_name('Sheet 2');
is($got, $expected, $caption);
# Test an invalid name.
$expected = undef;
$got = $workbook->get_worksheet_by_name('Sheet3');
is($got, $expected, $caption);
# Test an invalid name.
$expected = undef;
$got = $workbook->get_worksheet_by_name();
is($got, $expected, $caption);
Excel-Writer-XLSX-0.96/t/utility/xl_cell_to_rowcol.t 000755 000765 000024 00000007662 13032306506 022477 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_cell_to_rowcol);
use Test::More tests => 12;
###############################################################################
#
# Tests setup.
#
my @got;
my @expected;
my $caption;
my $cell;
my $row;
my $col;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @expected, [ $i, $i, 0, 0, $cell . ( $i + 1 ) ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @expected, [ $i, $i, 0, 0, $cell . ( $i + 1 ) ];
$cell++;
}
###############################################################################
#
# Test the xl_cell_to_rowcol method for the range of values generated above.
#
$caption = " \tUtility: xl_cell_to_rowcol()";
for my $aref ( @expected ) {
push @got, [ xl_cell_to_rowcol( $aref->[4] ), $aref->[4] ];
}
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the xl_cell_to_rowcol method with absolute references.
#
$cell = 'A1';
@expected = ( 0, 0, 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
$cell = 'A$1';
@expected = ( 0, 0, 1, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
$cell = '$A1';
@expected = ( 0, 0, 0, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol( $cell );
is_deeply( \@got, \@expected, $caption );
$cell = '$A$1';
@expected = ( 0, 0, 1, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol( $cell );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the xl_cell_to_rowcol examples in the docs.
#
($row, $col) = xl_cell_to_rowcol('A1'); # (0, 0)
@expected = ( 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('B1'); # (0, 1)
@expected = ( 0, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('C2'); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('$C2' ); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('C$2' ); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('$C$2'); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
###############################################################################
#
# Test error condition.
#
$cell = '';
@expected = ( 0, 0, 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Generate a caption for xl_cell_to_rowcol the tests.
#
sub _get_caption {
my $cell = shift;
my @coords = @_;
my $caption = " \tUtility: xl_cell_to_rowcol()";
if ($cell) {
$caption .= ': ' . $cell . " -> ( " . join( ', ', @expected) . ")";
}
return $caption;
}
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_col_to_name.t 000644 000765 000024 00000002663 13032306506 021741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_col_to_name);
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @$expected, [ $i, $cell ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @$expected, [ $i, $cell ];
$cell++;
}
###############################################################################
#
# Test the xl_col_to_name method.
#
$caption = " \tUtility: xl_col_to_name()";
for my $aref ( @$expected ) {
push @$got, [ $aref->[0], xl_col_to_name( $aref->[0] ) ];
}
is_deeply( $got, $expected, $caption );
###############################################################################
#
# Test the xl_col_to_name method with absolute references.
#
$expected = '$A';
$got = xl_col_to_name( 0, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_col_to_name method for the Pod example.
#
$expected = 'AAA';
$got = xl_col_to_name( 702 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_date_1904.t 000755 000765 000024 00000003012 13032306506 021044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_date_1904);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 0;
$expected = 0;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 1462;
$expected = 0;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 36526;
$expected = 35064;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 41255;
$expected = 39793;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_date_list.t 000755 000765 000024 00000006102 13032306506 021425 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_date_list);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 9;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my @date;
###############################################################################
#
# Test the xl_date_list() method.
#
@date = ();
$expected = undef;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2);
$expected = 37258;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 12);
$expected = 37258.5;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 14, 24);
$expected = 37258.6;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 12, 43, 12);
$expected = 37258.53;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 1, 1);
$expected = 1;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 2, 27);
$expected = 58;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 2, 28);
$expected = 59;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 3, 1);
$expected = 61;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_dec_col.t 000755 000765 000024 00000003060 13032306506 021045 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_dec_col);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = 'B1';
$expected = 'A1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = 'AA1';
$expected = 'Z1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = '$C1';
$expected = '$B1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = '$E$5';
$expected = '$D$5';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_dec_row.t 000755 000765 000024 00000003061 13032306506 021100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_dec_row);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = 'A2';
$expected = 'A1';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = 'B$3';
$expected = 'B$2';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = '$C4';
$expected = '$C3';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = '$D$5';
$expected = '$D$4';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_decode_date_EU.t 000755 000765 000024 00000005137 13032306506 022275 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_decode_date_EU);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 7;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$expected = undef;
$caption = " \tUtility: xl_decode_date_EU()";
$got = xl_decode_date_EU();
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '19/19/2000';
$expected = undef;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '2/1/2002';
$expected = 37258;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '11/7/97';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = 'Friday 11 July 1997';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '10:12 AM Friday 11 July 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_decode_date_US.t 000755 000765 000024 00000005140 13032306506 022305 0 ustar 00John staff 000000 000000
###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_decode_date_US);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 7;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$expected = undef;
$caption = " \tUtility: xl_decode_date_US()";
$got = xl_decode_date_US();
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '19/19/2000';
$expected = undef;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '1/2/2002';
$expected = 37258;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '7/11/97';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = 'July 11 Friday 1997';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '10:12 AM July 11 Friday 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_inc_col.t 000755 000765 000024 00000003060 13032306506 021063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_inc_col);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = 'A1';
$expected = 'B1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = 'Z1';
$expected = 'AA1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = '$B1';
$expected = '$C1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = '$D$5';
$expected = '$E$5';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_inc_row.t 000755 000765 000024 00000003061 13032306506 021116 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_inc_row);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = 'A1';
$expected = 'A2';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = 'B$2';
$expected = 'B$3';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = '$C3';
$expected = '$C4';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = '$D$4';
$expected = '$D$5';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_parse_date.t 000755 000765 000024 00000003522 13032306506 021567 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_parse_date xl_parse_date_init);
use Test::More;
eval { require Date::Manip; require Date::Calc};
if ( $@ ) {
plan skip_all =>
'Date::Manip and Date::Calc required to run optional tests.';
}
else {
plan tests => 4;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
xl_parse_date_init( "TZ=GMT", "DateFormat=non-US" );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '2/1/2002';
$expected = 37258;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '11/7/97';
$expected = 35622;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = 'Friday 11 July 1997';
$expected = 35622;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '10:12 AM Friday 11 July 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_parse_time.t 000755 000765 000024 00000010671 13032306506 021613 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_parse_time);
use Test::More tests => 14;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $time;
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12';
$expected = undef;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00 PM';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00 pm';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18:00';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18 AM';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18:00 am';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:43:12';
$expected = .53;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '14:24:00';
$expected = .60;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '36:18:00';
$expected = 1.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '108:18:00';
$expected = 4.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '1068:18:00';
$expected = 44.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_range.t 000644 000765 000024 00000006260 13032306506 020553 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_range);
use Test::More tests => 9;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
my @range;
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 0, 3, 0, 1 );
$expected = 'A1:B4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 0, 9, 0, 0 );
$expected = 'A1:A10';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 6, 65, 1, 1 );
$expected = 'B7:B66';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 1, 8, 2, 2 );
$expected = 'C2:C9';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 1, 0, 0, 0 );
$expected = 'A$1:E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 1, 0, 0 );
$expected = 'A1:E$4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 0, 1, 0 );
$expected = '$A1:E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 0, 0, 1 );
$expected = 'A1:$E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 1, 1, 1, 1 );
$expected = '$A$1:$E$4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_range_formula.t 000755 000765 000024 00000004716 13032306506 022307 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_range_formula);
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
my @range;
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 0, 9, 0, 0 );
$expected = '=Sheet1!$A$1:$A$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet2', 6, 65, 1, 1 );
$expected = '=Sheet2!$B$7:$B$66';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'New data', 1, 8, 2, 2 );
$expected = q(='New data'!$C$2:$C$9);
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( q('New data'), 1, 8, 2, 2 );
$expected = q(='New data'!$C$2:$C$9);
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 1, 9, 0, 0 );
$expected = '=Sheet1!$A$2:$A$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 1, 9, 1, 1 );
$expected = '=Sheet1!$B$2:$B$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/utility/xl_rowcol_to_cell.t 000644 000765 000024 00000002752 13032306506 022467 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_rowcol_to_cell);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @$expected, [ $i, $i, $cell . ( $i + 1 ) ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @$expected, [ $i, $i, $cell . ( $i + 1 ) ];
$cell++;
}
###############################################################################
#
# Test the xl_rowcol_to_cell method.
#
$caption = " \tUtility: xl_rowcol_to_cell()";
for my $aref ( @$expected ) {
push @$got,
[ $aref->[0], $aref->[1], xl_rowcol_to_cell( $aref->[0], $aref->[1] ) ];
}
is_deeply( $got, $expected, $caption );
###############################################################################
#
# Test the xl_rowcol_to_cell method with absolute references.
#
$expected = 'A$1';
$got = xl_rowcol_to_cell( 0, 0, 1 );
is( $got, $expected, $caption );
$expected = '$A1';
$got = xl_rowcol_to_cell( 0, 0, 0, 1 );
is( $got, $expected, $caption );
$expected = '$A$1';
$got = xl_rowcol_to_cell( 0, 0, 1, 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.96/t/regression/array_formula01.t 000644 000765 000024 00000003324 13032306505 022432 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'array_formula01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $data = [ 0, 0, 0 ];
$worksheet->write_col( 'B1', $data );
$worksheet->write_col( 'C1', $data );
$worksheet->write_array_formula( 'A1:A3', '{=SUM(B1:C1*B2:C2)}', undef, 0 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/array_formula02.t 000644 000765 000024 00000003411 13032306505 022430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'array_formula02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bold => 1);
my $data = [ 0, 0, 0 ];
$worksheet->write_col( 'B1', $data );
$worksheet->write_col( 'C1', $data );
$worksheet->write_array_formula( 'A1:A3', '{=SUM(B1:C1*B2:C2)}', $format, 0 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/autofilter00.t 000644 000765 000024 00000007064 13032306505 021751 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter00.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @data;
push @data, [split] while ;
#$worksheet->autofilter('A1:D51');
$worksheet->write('A1', [[@data]]);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter01.t 000644 000765 000024 00000007146 13032306505 021753 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @data;
push @data, [split] while ;
$worksheet->autofilter('A1:D51');
$worksheet->write('A1', [[@data]]);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter02.t 000644 000765 000024 00000010045 13032306505 021744 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('A1', \@headings);
$worksheet->autofilter(0, 0, 50, 3);
$worksheet->filter_column(0, 'Region eq East');
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq 'East' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter03.t 000644 000765 000024 00000010113 13032306505 021741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('A1', \@headings);
$worksheet->autofilter(0, 0, 50, 3);
$worksheet->filter_column('A', 'x eq East or x eq South');
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ($region eq 'East' or $region eq 'South') {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter04.t 000644 000765 000024 00000010270 13032306505 021746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write( 'A1', \@headings );
$worksheet->autofilter('A1:D51');
$worksheet->filter_column( 'A', 'x eq East' );
$worksheet->filter_column( 'C', 'x > 3000 and x < 8000' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
my $volume = $row_data->[2];
if ( $region eq 'East'
and $volume > 3000
and $volume < 8000 )
{
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter05.t 000644 000765 000024 00000010115 13032306505 021745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write( 'A1', \@headings );
# Create a blank cell in our test data.
$data[5]->[0] = '';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', 'x == Blanks' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq '' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter06.t 000644 000765 000024 00000010123 13032306505 021745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
# Create a blank cell in our test data.
$data[5]->[0] = '';
$worksheet->write( 'A1', \@headings );
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', 'x == NonBlanks' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region ne '' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/autofilter07.t 000644 000765 000024 00000007773 13032306505 021767 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('D3', \@headings);
$worksheet->autofilter('D3:G53');
$worksheet->filter_column('D', 'Region eq East');
# Hide the rows that don't match the filter criteria.
my $row = 3;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq 'East' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 3, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.96/t/regression/button01.t 000644 000765 000024 00000002671 13032306505 021106 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'C2', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button02.t 000644 000765 000024 00000002761 13032306505 021107 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'B4',
{ x_offset => 4, y_offset => 3, caption => 'my text' } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button03.t 000644 000765 000024 00000002740 13032306505 021105 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'C2', {} );
$worksheet->insert_button( 'E5', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button04.t 000644 000765 000024 00000003021 13032306505 021077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->insert_button( 'E5', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button05.t 000644 000765 000024 00000003023 13032306505 021102 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button(
'C2',
{
macro => 'my_macro',
x_scale => 2,
y_scale => 1.5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button06.t 000644 000765 000024 00000003025 13032306505 021105 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx6_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button(
'C2',
{
macro => 'my_macro',
width => 128,
height => 30
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button07.t 000644 000765 000024 00000003316 13032306505 021111 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button07.xlsm';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->set_vba_name('ThisWorkbook');
$worksheet->set_vba_name('Sheet1');
$workbook->set_vba_name();
$worksheet->set_vba_name();
$worksheet->insert_button(
'C2',
{
macro => 'say_hello',
caption => 'Hello',
}
);
$workbook->add_vba_project( $dir . 'xlsx_files/vbaProject02.bin' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button08.t 000644 000765 000024 00000003161 13032306505 021110 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->write_comment( 'A1', 'Foo' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button09.t 000644 000765 000024 00000003161 13032306505 021111 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Foo' );
$worksheet2->insert_button( 'C2', {} );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button10.t 000644 000765 000024 00000003402 13032306505 021077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Some text' );
$worksheet2->insert_button( 'B2', {} );
$worksheet3->write_comment( 'C2', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button11.t 000644 000765 000024 00000003402 13032306505 021100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->write_comment( 'B2', 'Some text' );
$worksheet3->write_comment( 'C3', 'More text' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button12.t 000644 000765 000024 00000003401 13032306505 021100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Some text' );
$worksheet1->insert_button( 'C2', {} );
$worksheet3->write_comment( 'C3', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button13.t 000644 000765 000024 00000003204 13032306505 021102 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button07.xlsm';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_button13.xlsm";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->set_vba_name();
$worksheet->set_vba_name();
$worksheet->insert_button(
'C2',
{
macro => 'say_hello',
caption => 'Hello',
}
);
$workbook->add_vba_project( $dir . 'xlsx_files/vbaProject02.bin' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/button14.t 000644 000765 000024 00000003143 13032306505 021105 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button07.xlsm';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_button14.xlsm";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Implicit vba names.
$worksheet->insert_button(
'C2',
{
macro => 'say_hello',
caption => 'Hello',
}
);
$workbook->add_vba_project( $dir . 'xlsx_files/vbaProject02.bin' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_area01.t 000644 000765 000024 00000003716 13032306505 021665 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43407616, 43433984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_area02.t 000644 000765 000024 00000003744 13032306505 021667 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1, subtype => 'stacked' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 62813312, 62814848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_area03.t 000644 000765 000024 00000003754 13032306505 021671 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1, subtype => 'percent_stacked' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 62813312, 62814848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_area04.t 000644 000765 000024 00000004014 13032306505 021660 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'area',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591168, 63592704 ];
$chart->{_axis2_ids} = [ 74921856, 73764224 ];
my $data = [ #
[ 1, 2, 3, 4, 5 ], #
[ 6, 8, 6, 4, 2 ], #
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis01.t 000644 000765 000024 00000004032 13032306505 021711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 58955648, 68446848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis02.t 000644 000765 000024 00000004035 13032306505 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43704320, 43706624 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis03.t 000644 000765 000024 00000005430 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 65514112, 65556864 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_title( name => 'Title' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis04.t 000644 000765 000024 00000004112 13032306505 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46891776, 46893312 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis05.t 000644 000765 000024 00000004033 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47076480, 47078016 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis06.t 000644 000765 000024 00000003617 13032306505 021726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_title( name => 'Title' );
# Axis formatting should be ignored.
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis07.t 000644 000765 000024 00000004107 13032306505 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43321216, 47077248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis08.t 000644 000765 000024 00000004034 13032306505 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49042560, 61199872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_y_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis09.t 000644 000765 000024 00000003764 13032306505 021734 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49043712, 60236160 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis10.t 000644 000765 000024 00000004100 13032306505 021705 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 41012608, 55821440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( reverse => 1 );
$chart->set_y_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis11.t 000644 000765 000024 00000003774 13032306505 021726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705472, 54518528 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( min => 0, max => 20 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis12.t 000644 000765 000024 00000003777 13032306505 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705088, 54517760 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( min => 0, max => 16 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis13.t 000644 000765 000024 00000004126 13032306505 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54045312, 54043776 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_y_axis( min => 0, max => 16 );
$chart->set_x_axis( min => 0, max => 6 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis14.t 000644 000765 000024 00000005407 13032306505 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43814272, 54517760 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_y_axis( min => 0, max => 30 );
$chart->set_x_axis( min => 39083, max => 39087 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis15.t 000644 000765 000024 00000004016 13032306505 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 54518528 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( minor_unit => 0.4, major_unit => 2 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis16.t 000644 000765 000024 00000005260 13032306505 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43572608, 43812736 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis(
minor_unit => 14,
major_unit => 1,
major_unit_type => 'months'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis17.t 000644 000765 000024 00000003772 13032306505 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812736, 45705088 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( log_base => 10 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis18.t 000644 000765 000024 00000004005 13032306505 021721 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43813504, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', invert_if_negative => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', invert_if_negative => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis19.t 000644 000765 000024 00000004063 13032306505 021726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43813504, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( label_position => 'high' );
$chart->set_y_axis( label_position => 'low' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis20.t 000644 000765 000024 00000004067 13032306505 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43572224, 43812352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( label_position => 'next_to' );
$chart->set_y_axis( label_position => 'none' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis21.t 000644 000765 000024 00000004044 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 58921344, 54519680 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis22.t 000644 000765 000024 00000004003 13032306505 021712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 86799104, 86801792 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => '#,##0.00' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis23.t 000644 000765 000024 00000004062 13032306505 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46332160, 47470848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => 'dd/mm/yyyy' );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis24.t 000644 000765 000024 00000004112 13032306505 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47471232, 48509696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => 'dd/mm/yyyy', num_format_linked => 1 );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis25.t 000644 000765 000024 00000004102 13032306505 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis25.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47471232, 48509696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => '[$ТЅ-411]#,##0.00' );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis26.t 000644 000765 000024 00000004010 13032306505 021714 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis26.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73048448, 73049984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => 45 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis27.t 000644 000765 000024 00000004011 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis27.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73048448, 73049984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => -35 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis28.t 000644 000765 000024 00000004010 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis28.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45451904, 47401600 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => 90 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis29.t 000644 000765 000024 00000004011 13032306505 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis29.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45444480, 47402368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => -90 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis30.t 000644 000765 000024 00000003727 13032306505 021725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis30.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69200896, 69215360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis( position_axis => 'on_tick' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis31.t 000644 000765 000024 00000003726 13032306505 021725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis31.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 90616960, 90618496 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_y_axis( position_axis => 'on_tick' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis32.t 000644 000765 000024 00000003727 13032306505 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis32.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 96171520, 96173056 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis( position_axis => 'between' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis33.t 000644 000765 000024 00000004177 13032306505 021730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis33.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68827008, 68898816 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX', name_font => { rotation => -45, baseline => -1 } );
$chart->set_y_axis( name => 'YYY', name_font => { rotation => -45, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis34.t 000644 000765 000024 00000003773 13032306505 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis34.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54712192, 54713728 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( interval_unit => 2 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis35.t 000644 000765 000024 00000004000 13032306505 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis35.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63008128, 62522496 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( line => { none => 1 });
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis36.t 000644 000765 000024 00000004000 13032306505 021714 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis36.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45501056, 47505792 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( line => { none => 1 });
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis37.t 000644 000765 000024 00000004074 13032306505 021730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis37.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46032384, 48088960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( line => { color => 'yellow' });
$chart->set_y_axis( line => { color => 'red' });
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis38.t 000644 000765 000024 00000004070 13032306505 021725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis38.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45642496, 45644416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( line => { color => 'yellow' },
fill => { color => 'red' });
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis39.t 000644 000765 000024 00000004126 13032306505 021730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis39.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45884928, 45883392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( line => { none => 1 });
$chart->set_y_axis( line => { none => 1 });
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis40.t 000644 000765 000024 00000004024 13032306505 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis40.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108329216, 108635264 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( interval_unit => 3, interval_tick => 2 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_axis41.t 000644 000765 000024 00000004130 13032306505 021714 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis41.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108321024, 108328448 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( major_tick_mark => 'none', minor_tick_mark => 'inside' );
$chart->set_y_axis( minor_tick_mark => 'cross' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar01.t 000644 000765 000024 00000003713 13032306505 021516 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64052224, 64055552 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar02.t 000644 000765 000024 00000004277 13032306505 021525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 93218304, 93219840 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', 'Foo' );
$worksheet2->write( 'A1', $data );
$chart->add_series(
categories => 'Sheet2!$A$1:$A$5',
values => 'Sheet2!$B$1:$B$5',
);
$chart->add_series(
categories => 'Sheet2!$A$1:$A$5',
values => 'Sheet2!$C$1:$C$5',
);
$worksheet2->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar03.t 000644 000765 000024 00000005030 13032306505 021512 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 64265216, 64447616 ];
$chart2->{_axis_ids} = [ 86048128, 86058112 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart1 );
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$4',
values => '=Sheet1!$B$1:$B$4',
);
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$4',
values => '=Sheet1!$C$1:$C$4',
);
$worksheet->insert_chart( 'F25', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar04.t 000644 000765 000024 00000005177 13032306505 021527 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' [ ' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 64446848, 64448384 ];
$chart2->{_axis_ids} = [ 85389696, 85391232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
# Sheet 1
$worksheet1->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet1->insert_chart( 'E9', $chart1 );
# Sheet 2
$worksheet2->write( 'A1', $data );
$chart2->add_series(
categories => '=Sheet2!$A$1:$A$5',
values => '=Sheet2!$B$1:$B$5',
);
$chart2->add_series(
categories => '=Sheet2!$A$1:$A$5',
values => '=Sheet2!$C$1:$C$5',
);
$worksheet2->insert_chart( 'E9', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar05.t 000644 000765 000024 00000003640 13032306505 021521 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64264064, 64447232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar06.t 000644 000765 000024 00000004152 13032306505 021521 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64053248, 64446464 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'Apple' );
$chart->set_y_axis( name => 'Pear' );
$chart->set_title( name => 'Title' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar07.t 000644 000765 000024 00000004172 13032306505 021524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name_formula => '=Sheet1!$A$2', data => [2] );
$chart->set_y_axis( name_formula => '=Sheet1!$A$3', data => [3] );
$chart->set_title( name_formula => '=Sheet1!$A$1', data => [1] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar08.t 000644 000765 000024 00000003723 13032306505 021526 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40522880, 40524416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'http://www.perl.com/' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar09.t 000644 000765 000024 00000004012 13032306505 021517 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart =
$workbook->add_chart( type => 'bar', subtype => 'stacked', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40274560, 40295040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar10.t 000644 000765 000024 00000004041 13032306505 021511 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'bar',
subtype => 'percent_stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40274560, 40295040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar11.t 000644 000765 000024 00000005263 13032306505 021521 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [
' [
' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart3 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'http://www.perl.com/' );
$worksheet->write( 'A8', 'http://www.perl.org/' );
$worksheet->write( 'A9', 'http://www.perl.net/' );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart3->add_series( values => '=Sheet1!$A$1:$A$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'D25', $chart2 );
$worksheet->insert_chart( 'L32', $chart3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar12.t 000644 000765 000024 00000003560 13032306505 021520 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40293888, 40295424 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar13.t 000644 000765 000024 00000004422 13032306505 021517 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'bar' );
my $worksheet4 = $workbook->add_worksheet();
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
$chart2->{_chart}->{_axis_ids} = [ 62356096, 62366080 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar14.t 000644 000765 000024 00000005325 13032306505 021523 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart3 = $workbook->add_chart( type => 'column' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 40294272, 40295808 ];
$chart2->{_axis_ids} = [ 40261504, 65749760 ];
$chart3->{_chart}->{_axis_ids} = [ 65465728, 66388352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet2->write( 'A1', $data );
$worksheet2->write( 'A6', 'http://www.perl.com/' );
$chart3->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet2!$B$1:$B$5' );
$chart3->add_series( values => '=Sheet2!$C$1:$C$5' );
$chart1->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet2!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet2!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$worksheet2->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'F25', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar15.t 000644 000765 000024 00000004330 13032306505 021517 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'column' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_chart}->{_axis_ids} = [ 62576896, 62582784 ];
$chart2->{_chart}->{_axis_ids} = [ 65979904, 65981440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar16.t 000644 000765 000024 00000004077 13032306505 021530 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 64784640, 65429504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'Apple' );
$chart->set_y_axis( name => 'Pear' );
$chart->set_title( name => 'Title' );
$chart->set_legend( position => 'bottom' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar17.t 000644 000765 000024 00000003663 13032306505 021531 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar18.t 000644 000765 000024 00000004416 13032306505 021527 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
'xl/printerSettings/printerSettings1.bin',
'xl/chartsheets/_rels/sheet1.xml.rels',
'\[Content_Types\].xml',
];
my $ignore_elements = {
'xl/chartsheets/sheet1.xml' => [
' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->activate();
$chart->set_header( 'Page &P' );
$chart->set_footer( '&A' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar19.t 000644 000765 000024 00000004152 13032306505 021525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 66558592, 66569344 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => [ 'Sheet1', 0, 4, 0, 0 ] );
$chart->add_series( values => [ 'Sheet1', 0, 4, 1, 1 ] );
$chart->add_series( values => [ 'Sheet1', 0, 4, 2, 2 ] );
$chart->set_x_axis( name => '=Sheet1!$A$2' );
$chart->set_y_axis( name => '=Sheet1!$A$3' );
$chart->set_title( name => '=Sheet1!$A$1' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar20.t 000644 000765 000024 00000004102 13032306505 021510 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45925120, 45927040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'Pear' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', name => 'Apple' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', name => '=Sheet1!$A$7' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar21.t 000644 000765 000024 00000004154 13032306505 021520 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64052224, 64055552 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
categories_data => $data->[0],
values_data => $data->[1],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
categories_data => $data->[0],
values_data => $data->[2],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar22.t 000644 000765 000024 00000005203 13032306505 021515 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43706240, 43727104 ];
my $headers = [ 'Series 1', 'Series 2', 'Series 3' ];
my $data = [
[ 'Category 1', 'Category 2', 'Category 3', 'Category 4' ],
[ 4.3, 2.5, 3.5, 4.5 ],
[ 2.4, 4.5, 1.8, 2.8 ],
[ 2, 2, 3, 5 ],
];
$worksheet->set_column( 'A:D', 11 );
$worksheet->write( 'B1', $headers );
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$B$2:$B$5',
categories_data => $data->[0],
values_data => $data->[1],
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$C$2:$C$5',
categories_data => $data->[0],
values_data => $data->[2],
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$D$2:$D$5',
categories_data => $data->[0],
values_data => $data->[3],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar23.t 000644 000765 000024 00000004661 13032306505 021525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43706240, 43727104 ];
my $headers = [ 'Series 1', 'Series 2', 'Series 3' ];
my $data = [
[ 'Category 1', 'Category 2', 'Category 3', 'Category 4' ],
[ 4.3, 2.5, 3.5, 4.5 ],
[ 2.4, 4.5, 1.8, 2.8 ],
[ 2, 2, 3, 5 ],
];
$worksheet->set_column( 'A:D', 11 );
$worksheet->write( 'B1', $headers );
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$B$2:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$C$2:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$D$2:$D$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_bar24.t 000644 000765 000024 00000003753 13032306505 021527 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591168, 63592704 ];
$chart->{_axis2_ids} = [ 65934464, 72628864 ];
my $data = [ [ 27, 33, 44, 12, 1 ], [ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank01.t 000644 000765 000024 00000003705 13032306505 022042 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 45843584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'gap' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank02.t 000644 000765 000024 00000003706 13032306505 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 44253568, 44269952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'zero' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank03.t 000644 000765 000024 00000003706 13032306505 022045 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 44253568, 44269952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank04.t 000644 000765 000024 00000003722 13032306505 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42268928, 42990208 ];
my $data = [
[ 1, 2, undef, 4, 5 ],
[ 2, 4, undef, 8, 10 ],
[ 3, 6, undef, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank05.t 000644 000765 000024 00000003722 13032306505 022045 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/drawings/drawing1.xml' => ['xdr:ext'] };
###############################################################################
#
# Test the worksheet properties of an Excel::Writer::XLSX chartsheet file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 57619968, 57621504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_blank06.t 000644 000765 000024 00000003700 13032306505 022042 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42270080, 42990208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_hidden_data();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_chartarea01.t 000644 000765 000024 00000004201 13032306505 022675 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82933248, 82952960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_chartarea(
border => { none => 1 },
fill => { color => 'red' }
);
$chart->set_plotarea(
border => { color => 'yellow', width => 1, dash_type => 'dash' },
fill => { color => '#92D050' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_chartarea02.t 000644 000765 000024 00000004275 13032306505 022711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82933248, 82952960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the deprected Spreadsheet::WriteExcel interface.
$chart->set_chartarea(
line_pattern => 'none',
color => 'red'
);
$chart->set_plotarea(
line_pattern => 'dash',
line_weight => 'narrow',
line_color => 'yellow',
color => '#92D050'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_chartarea03.t 000644 000765 000024 00000004256 13032306505 022711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46210048, 46208512 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_chartarea(
border => { dash_type => 'round_dot' },
fill => { color => '#9999FF' }
);
$chart->set_plotarea(
border => { dash_type => 'square_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_chartarea04.t 000644 000765 000024 00000005440 13032306505 022706 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82954112, 82956288 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_chartarea(
border => { color => '#FF0000' },
fill => { color => '#00B050' }
);
$chart->set_plotarea(
border => { dash_type => 'dash_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_chartarea05.t 000644 000765 000024 00000003736 13032306505 022715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_chartarea(
border => { color => '#FFFF00', dash_type => 'long_dash' },
fill => { color => '#92D050' }
);
# This should be ignored for a pie chart.
$chart->set_plotarea(
border => { dash_type => 'dash_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_clustered01.t 000644 000765 000024 00000005361 13032306505 022745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_clustered01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(type => 'column', embedded => 1);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45886080, 45928832 ];
my $data = [
[ 'Types', 'Sub Type', 'Value 1', 'Value 2', 'Value 3' ],
[ 'Type 1', 'Sub Type A', 5000, 8000, 6000 ],
[ '', 'Sub Type B', 2000, 3000, 4000 ],
[ '', 'Sub Type C', 250, 1000, 2000 ],
[ 'Type 2', 'Sub Type D', 6000, 6000, 6500 ],
[ '', 'Sub Type E', 500, 300, 200 ],
];
my $cat_data = [
[ 'Type 1', undef, undef, 'Type 2', undef ],
[ 'Sub Type A', 'Sub Type B', 'Sub Type C', 'Sub Type D', 'Sub Type E' ]
];
$worksheet->write_col( 'A1', $data );
$chart->add_series(
name => '=Sheet1!$C$1',
categories => '=Sheet1!$A$2:$B$6',
values => '=Sheet1!$C$2:$C$6',
categories_data => $cat_data,
);
$chart->add_series(
name => '=Sheet1!$D$1',
categories => '=Sheet1!$A$2:$B$6',
values => '=Sheet1!$D$2:$D$6',
);
$chart->add_series(
name => '=Sheet1!$E$1',
categories => '=Sheet1!$A$2:$B$6',
values => '=Sheet1!$E$2:$E$6',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column01.t 000644 000765 000024 00000005773 13032306505 022257 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43424000, 43434368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test the removal of charts that are created but not added to worksheets.
#
$workbook = Excel::Writer::XLSX->new( $got_filename );
$worksheet = $workbook->add_worksheet();
$chart = $workbook->add_chart( type => 'column', embedded => 1 );
# Unused chart that should be removed before writing xlsx file.
$workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43424000, 43434368 ];
$data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column02.t 000644 000765 000024 00000004036 13032306505 022247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
subtype => 'stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49388544, 69387008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column03.t 000644 000765 000024 00000004045 13032306505 022250 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
subtype => 'percent_stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49388544, 69387008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column04.t 000644 000765 000024 00000003772 13032306505 022257 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591936, 63593856 ];
$chart->{_axis2_ids} = [ 63613568, 63612032 ];
my $data = [ [ 1, 2, 3, 4, 5 ], [ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column05.t 000644 000765 000024 00000003644 13032306505 022256 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet( 'Foo' );
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47292800, 47295104 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Foo!$A$1:$A$5' );
$chart->add_series( values => '=Foo!$B$1:$B$5' );
$chart->add_series( values => '=Foo!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column06.t 000644 000765 000024 00000004004 13032306505 022246 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47363584, 49673344 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet2->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column07.t 000644 000765 000024 00000003572 13032306505 022260 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68810240, 68811776 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=(Sheet1!$A$1:$A$2,Sheet1!$A$4:$A$5)',
values_data => [1, 2, 4, 5],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column08.t 000644 000765 000024 00000003753 13032306505 022262 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68809856, 68811392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=(Sheet1!$A$1:$A$2,Sheet1!$A$4:$A$5)',
values => '=(Sheet1!$B$1:$B$2,Sheet1!$B$4:$B$5)',
categories_data => [ 1, 2, 4, 5 ],
values_data => [ 2, 4, 8, 10 ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column09.t 000644 000765 000024 00000003543 13032306505 022260 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47400832, 61387136 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 1, 2, 3, 2, 1 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column10.t 000644 000765 000024 00000003543 13032306505 022250 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45686144, 45722240 ];
my $data = [
[ 'A', 'B', 'C', 'D', 'E' ],
[ 1, 2, 3, 2, 1 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column11.t 000644 000765 000024 00000003676 13032306505 022260 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46847488, 46849408 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_style(1);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_column12.t 000644 000765 000024 00000003677 13032306505 022262 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46847488, 46849408 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_style(48);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined01.t 000644 000765 000024 00000003542 13032306505 022532 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 84882560, 84884096 ];
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined02.t 000644 000765 000024 00000003771 13032306505 022537 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
# For this test the ids match the generated ids.
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined03.t 000644 000765 000024 00000004114 13032306505 022530 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
# For this test the ids match the generated ids.
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
[ 4, 2, 5, 2, 1 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined04.t 000644 000765 000024 00000004216 13032306505 022534 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements ={ 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
# For this test the ids match the generated ids.
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined05.t 000644 000765 000024 00000004367 13032306505 022544 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements ={ 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 60914304, 78899072 ];
$chart2->{_axis2_ids} = [ 85542016, 85183872 ];
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined06.t 000644 000765 000024 00000004134 13032306505 022535 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'area', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 91755648, 91757952 ];
$chart2->{_axis_ids} = [ 91755648, 91757952 ];
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->combine($chart2);
# For testing.
$chart1->{_cross_between} = 'between';
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined07.t 000644 000765 000024 00000004327 13032306505 022542 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
# For this test the ids match the generated ids.
$chart1->{_axis_ids} = [ 81267328, 81297792 ];
$chart2->{_axis_ids} = [ 81267328, 81297792 ];
my $data = [
[ 2, 3, 4, 5, 6 ],
[ 20, 25, 10, 10, 20 ],
[ 5, 10, 15, 10, 5 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5'
);
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5'
);
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined08.t 000644 000765 000024 00000006044 13032306505 022541 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# TODO. There are too many ignored elements here. Remove when the
# axis writing is fixed for secondary scatter charts.
my $ignore_elements = { 'xl/charts/chart1.xml' => ['',
'',
'',
'',
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
# For this test the ids match the generated ids.
$chart1->{_axis_ids} = [ 81267328, 81297792 ];
$chart2->{_axis_ids} = [ 81267328, 81297792 ];
$chart2->{_axis2_ids} = [ 89510656, 84556032 ];
my $data = [
[ 2, 3, 4, 5, 6 ],
[ 20, 25, 10, 10, 20 ],
[ 5, 10, 15, 10, 5 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5'
);
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
y2_axis => 1,
);
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_combined09.t 000644 000765 000024 00000004401 13032306505 022535 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_combined09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements ={ 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'column', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 114984064, 114985600 ];
$chart2->{_axis2_ids} = [ 114988928, 114987392 ];
my $data = [
[ 2, 7, 3, 6, 2 ],
[ 20, 25, 10, 10, 20 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$chart1->set_y_axis ( num_font => {bold => 1, baseline => -1} );
$chart2->set_y2_axis( num_font => {bold => 1, baseline => -1} );
$chart1->combine($chart2);
$worksheet->insert_chart( 'E9', $chart1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_crossing01.t 000644 000765 000024 00000004136 13032306505 022601 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812352, 43814272 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( crossing => 'max');
# Not stictly required. Just to match reference file.
$chart->set_x_axis( position => 't' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_crossing02.t 000644 000765 000024 00000004042 13032306505 022576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812352, 43814272 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( crossing => 3 );
$chart->set_y_axis( crossing => 8 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_crossing03.t 000644 000765 000024 00000004177 13032306505 022610 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54519680, 54518144 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( crossing => 'max', position => 'top' );
$chart->set_y_axis( crossing => 'max', position => 'right' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_crossing04.t 000644 000765 000024 00000004117 13032306505 022603 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54519296, 54517760 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( crossing => 3 );
$chart->set_y_axis( crossing => 8 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels01.t 000644 000765 000024 00000004072 13032306505 023204 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45848832, 47718784 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'outside_end' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'inside_base' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels02.t 000644 000765 000024 00000004064 13032306505 023206 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47721856, 53641216 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'inside_end' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'center' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels03.t 000644 000765 000024 00000004067 13032306505 023212 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45693952, 45762816 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'outside_end' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'inside_base' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels04.t 000644 000765 000024 00000004061 13032306505 023205 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47719168, 47720704 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'inside_end' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'center' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels05.t 000644 000765 000024 00000004155 13032306505 023212 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45678592, 45680128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'right' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'top' },
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, position => 'bottom' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels06.t 000644 000765 000024 00000004156 13032306505 023214 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45678592, 45680128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'right' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'left' },
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, position => 'center' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels07.t 000644 000765 000024 00000003577 13032306505 023223 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45703168, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'center' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels08.t 000644 000765 000024 00000004015 13032306505 023210 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740416, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'right' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels09.t 000644 000765 000024 00000004105 13032306505 023211 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740416, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'above' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, position => 'below' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels10.t 000644 000765 000024 00000004105 13032306505 023201 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740416, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'left' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, position => 'center' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels11.t 000644 000765 000024 00000003427 13032306505 023210 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, leader_lines => 1, position => 'best_fit' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels12.t 000644 000765 000024 00000003432 13032306505 023205 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, leader_lines => 1, position => 'outside_end' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels13.t 000644 000765 000024 00000003431 13032306505 023205 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, leader_lines => 1, position => 'inside_end' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels14.t 000644 000765 000024 00000003425 13032306505 023211 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, leader_lines => 1, position => 'center' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels15.t 000644 000765 000024 00000003434 13032306505 023212 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, leader_lines => 1 , position => 'best_fit'},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels16.t 000644 000765 000024 00000003600 13032306505 023206 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45858816, 45860352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, position => 'center' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels17.t 000644 000765 000024 00000005176 13032306505 023221 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740032, 45747200 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
data_labels => { value => 1, position => 'right' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels18.t 000644 000765 000024 00000004202 13032306505 023207 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740416, 45747584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, category => 1 },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, separator => ';' },
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, category => 1, separator => '.' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels19.t 000644 000765 000024 00000004203 13032306505 023211 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740416, 45747584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, category => 1 },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, separator => "\n" },
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, category => 1, separator => ' ' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels20.t 000644 000765 000024 00000003750 13032306505 023207 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45740032, 45743104 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, legend_key => 1 },
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels21.t 000644 000765 000024 00000004117 13032306505 023206 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => {
value => 1,
category => 1,
series_name => 1,
percentage => 1,
separator => ';',
leader_lines => 1,
position => 'inside_end',
legend_key => 1,
num_format => '#,##0.00',
font => { name => 'Consolas', baseline => -1, pitch_family => 49, charset => 0 }
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels22.t 000644 000765 000024 00000004117 13032306505 023207 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 45740416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1, num_format => '#,##0.00' },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'inside_base', num_format => '0.00' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels23.t 000644 000765 000024 00000004206 13032306505 023207 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 45740416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => {
value => 1,
font => { name => 'Consolas', baseline => -1, pitch_family => 49, charset => 0 }
},
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'inside_base' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels24.t 000644 000765 000024 00000004222 13032306505 023206 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45937792, 45939712 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => {
value => 1,
font => { name => 'Consolas', size => 12, baseline => -1, pitch_family => 49, charset => 0 }
},
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, position => 'inside_base' },
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_data_labels25.t 000644 000765 000024 00000004350 13032306505 023211 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_data_labels25.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108652800, 108656128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
data_labels => { value => 1,
position => 'outside_end',
font => { rotation => 45, baseline => -1 } },
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1,
position => 'inside_base',
font => { rotation => -45, baseline => -1 }},
);
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_date01.t 000644 000765 000024 00000004663 13032306505 021674 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73655040, 73907584 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
date_axis => 1
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_date02.t 000644 000765 000024 00000005102 13032306505 021662 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 55112064, 55115136 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
min => $worksheet->convert_date_time('2013-01-02T'),
max => $worksheet->convert_date_time('2013-01-09T'),
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_date03.t 000644 000765 000024 00000004754 13032306505 021677 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51761152, 51762688 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
minor_unit => 1,
major_unit => 1,
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_date04.t 000644 000765 000024 00000005061 13032306505 021670 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51761152, 51762688 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
minor_unit => 1,
minor_unit_type => 'months',
major_unit => 1,
major_unit_type => 'years',
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_date05.t 000644 000765 000024 00000004663 13032306505 021700 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45937408, 45939328 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
text_axis => 1
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units01.t 000644 000765 000024 00000003454 13032306505 023643 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69572096, 93549312 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units02.t 000644 000765 000024 00000003574 13032306505 023647 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'hundreds', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units03.t 000644 000765 000024 00000003575 13032306505 023651 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'thousands', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units04.t 000644 000765 000024 00000003601 13032306505 023640 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'ten_thousands', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units05.t 000644 000765 000024 00000003605 13032306505 023645 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'hundred_thousands', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units06.t 000644 000765 000024 00000003574 13032306505 023653 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 93548544, 93550464 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'millions', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units07.t 000644 000765 000024 00000003600 13032306505 023642 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'ten_millions', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units08.t 000644 000765 000024 00000003604 13032306505 023647 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'hundred_millions', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units09.t 000644 000765 000024 00000003574 13032306505 023656 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'billions', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units10.t 000644 000765 000024 00000003575 13032306505 023647 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'trillions', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units11.t 000644 000765 000024 00000003537 13032306505 023646 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69559424, 69560960 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_y_axis( display_units => 'hundreds');
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_display_units12.t 000644 000765 000024 00000004036 13032306505 023642 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_display_units12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 93550464, 93548544 ];
my $data = [
[ 10000000, 20000000, 30000000, 20000000, 10000000 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'B1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5'
);
$chart->set_y_axis( display_units => 'hundreds', display_units_visible => 0 );
$chart->set_x_axis( display_units => 'thousands', display_units_visible => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut01.t 000644 000765 000024 00000003322 13032306505 022603 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut02.t 000644 000765 000024 00000003356 13032306505 022613 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_hole_size(10);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut03.t 000644 000765 000024 00000003356 13032306505 022614 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_hole_size(90);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut04.t 000644 000765 000024 00000003355 13032306505 022614 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_rotation(30);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut05.t 000644 000765 000024 00000003356 13032306505 022616 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_rotation(360);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_doughnut06.t 000644 000765 000024 00000003342 13032306505 022612 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_doughnut06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'doughnut', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_drop_lines01.t 000644 000765 000024 00000004000 13032306505 023076 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48034944, 48036864 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_drop_lines02.t 000644 000765 000024 00000004067 13032306505 023114 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 70938624, 70940160 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines( line => { color => 'red', dash_type => 'square_dot' } );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_drop_lines03.t 000644 000765 000024 00000004000 13032306505 023100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61151872, 63947136 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 1, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_drop_lines04.t 000644 000765 000024 00000005172 13032306505 023114 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49019520, 49222016 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_drop_lines();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars01.t 000644 000765 000024 00000004026 13032306505 022751 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63386752, 63388288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars02.t 000644 000765 000024 00000004344 13032306505 022755 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63385984, 63387904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'fixed',
value => 2,
end_style => 0,
direction => 'minus'
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
y_error_bars => {
type => 'percentage',
value => 5,
direction => 'plus'
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars03.t 000644 000765 000024 00000004137 13032306505 022756 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 52288896, 53605504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'standard_error',
line => { color => 'red', dash_type => 'round_dot' }
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars04.t 000644 000765 000024 00000004130 13032306505 022750 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61626624, 69664128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
x_error_bars => { type => 'standard_deviation', value => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars05.t 000644 000765 000024 00000004025 13032306505 022754 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49016832, 49019136 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
x_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars06.t 000644 000765 000024 00000004030 13032306505 022751 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45472384, 49016832 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars07.t 000644 000765 000024 00000005374 13032306505 022766 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470848, 45472768 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
y_error_bars => { type => 'standard_error' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars08.t 000644 000765 000024 00000004134 13032306505 022760 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198976, 69200896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => [1],
minus_values => [2]
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars09.t 000644 000765 000024 00000004154 13032306505 022763 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 71917952, 71919488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => [ 1, 2, 3 ],
minus_values => [ 2, 4, 6 ]
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_errorbars10.t 000644 000765 000024 00000004272 13032306505 022754 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198976, 69200896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => '=Sheet1!$A$1',
minus_values => '=Sheet1!$B$1:$B$3',
plus_data => [1],
minus_data => [ 2, 4, 6 ],
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font01.t 000644 000765 000024 00000004302 13032306505 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43945344, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
num_font => { size => 11, bold => 1, italic => 1 }
);
$chart->set_y_axis(
name => 'YYY',
num_font => { size => 9, bold => 0, italic => 1 }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font02.t 000644 000765 000024 00000004442 13032306505 021721 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43945344, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
name_font => { bold => 0, italic => 1 },
num_font => { size => 11, bold => 1, italic => 1 },
);
$chart->set_y_axis(
name => 'YYY',
name_font => { bold => 1, italic => 1 },
num_font => { size => 9, bold => 0, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font03.t 000644 000765 000024 00000004524 13032306505 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45704704, 45716224 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
name_font => { bold => 0, italic => 1 },
);
$chart->set_x_axis(
name => 'XXX',
name_font => { bold => 0, italic => 1 },
num_font => { size => 11, bold => 1, italic => 1 },
);
$chart->set_y_axis(
name => 'YYY',
name_font => { bold => 1, italic => 1 },
num_font => { size => 9, bold => 0, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font04.t 000644 000765 000024 00000004401 13032306505 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43944960, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => '=Sheet1!$A$1',
name_font => { bold => 0, italic => 1 },
);
$chart->set_x_axis(
name => '=Sheet1!$A$2',
name_font => { bold => 0, italic => 1 },
);
$chart->set_y_axis(
name => '=Sheet1!$A$3',
name_font => { bold => 1, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font05.t 000644 000765 000024 00000004327 13032306505 021726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49407488, 53740288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
num_font => { name => 'Arial', pitch_family => 34, charset => 0 }
);
$chart->set_y_axis(
name => 'YYY',
num_font => { bold => 1, italic => 1, underline => 1, }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font06.t 000644 000765 000024 00000005470 13032306505 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49407488, 53740288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
name_font => {
name => 'Calibri',
pitch_family => 34,
charset => 0,
color => 'yellow',
},
);
$chart->set_x_axis(
name => 'XXX',
name_font => {
name => 'Courier New',
pitch_family => 49,
charset => 0,
color => '#92D050'
},
num_font => {
name => 'Arial',
pitch_family => 34,
charset => 0,
color => '#00B0F0',
},
);
$chart->set_y_axis(
name => 'YYY',
name_font => {
name => 'Century',
pitch_family => 18,
charset => 0,
color => 'red'
},
num_font => {
bold => 1,
italic => 1,
underline => 1,
color => '#7030A0',
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font07.t 000644 000765 000024 00000003741 13032306505 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69215744, 69217280 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( font => { size => 9, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font08.t 000644 000765 000024 00000003756 13032306505 021736 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69199744, 69214976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( font => { bold => 1, italic => 1, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_font09.t 000644 000765 000024 00000004051 13032306505 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68825472, 68827392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title', name_font => { rotation => -45, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format01.t 000644 000765 000024 00000003736 13032306505 022247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46335872, 46365696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format02.t 000644 000765 000024 00000004005 13032306505 022236 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46335872, 46365696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
line => { color => 'red' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format03.t 000644 000765 000024 00000004060 13032306505 022240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46175744, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'yellow' },
fill => { color => 'red' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format04.t 000644 000765 000024 00000004013 13032306505 022237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46175744, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
fill => { color => '#FF0000' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format05.t 000644 000765 000024 00000004012 13032306505 022237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46319488, 46335872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format06.t 000644 000765 000024 00000004101 13032306505 022237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46163840, 46175360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'diamond', size => 7 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format07.t 000644 000765 000024 00000004240 13032306505 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46163840, 46175360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => {
type => 'square',
size => 5,
line => { color => 'yellow' },
fill => { color => 'red' },
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format08.t 000644 000765 000024 00000004065 13032306505 022252 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46164608, 46176128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => { type => 'linear' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format09.t 000644 000765 000024 00000004202 13032306505 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46115072, 46157184 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
line => {
color => 'red',
width => 1.25,
dash_type => 'square_dot',
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format10.t 000644 000765 000024 00000004301 13032306505 022234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54795648, 56296960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'linear',
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
},
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format11.t 000644 000765 000024 00000004471 13032306505 022245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 50664576, 50666496 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'polynomial',
name => 'My trend name',
order => 2,
forward => 0.5,
backward => 0.5,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format12.t 000644 000765 000024 00000004342 13032306505 022243 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54794880, 56296576 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'moving_average',
period => 2,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
},
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format13.t 000644 000765 000024 00000004057 13032306505 022247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51785088, 51804032 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format14.t 000644 000765 000024 00000004120 13032306505 022237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51819264, 52499584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, series_name => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format15.t 000644 000765 000024 00000004143 13032306505 022245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42401792, 42403712 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => { type => 'linear' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_legend( delete_series => [2, 0] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format16.t 000644 000765 000024 00000004146 13032306505 022251 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43943040, 44287488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, series_name => 1, position => 'center' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format17.t 000644 000765 000024 00000003715 13032306505 022253 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42379520, 47284608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', fill => { none => 1 } );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format18.t 000644 000765 000024 00000003764 13032306505 022260 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42379520, 47284608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
border => { none => 1 },
fill => { none => 1 }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format19.t 000644 000765 000024 00000004021 13032306505 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
subtype => 'stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56127488, 57455360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series(
values => '=Sheet1!$C$1:$C$5',
data_labels => { value => 1, position => 'inside_base' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format20.t 000644 000765 000024 00000004510 13032306505 022237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'line', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 80553856, 80555392 ];
$chart2->{_axis_ids} = [ 84583936, 84585856 ];
my $trend = {
type => 'linear',
line => { color => 'red', dash_type => 'dash' }
};
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series(
values => '=Sheet1!$B$1:$B$5',
trendline => $trend,
);
$chart1->add_series(
values => '=Sheet1!$C$1:$C$5',
);
$chart2->add_series(
values => '=Sheet1!$B$1:$B$5',
trendline => $trend,
);
$chart2->add_series(
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'E25', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format21.t 000644 000765 000024 00000004106 13032306505 022241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 115390336, 115417856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'yellow' },
fill => { color => 'red', transparency => 24 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format22.t 000644 000765 000024 00000004105 13032306505 022241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108321024, 108328448 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'yellow' },
fill => { color => 'red', transparency => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format23.t 000644 000765 000024 00000004107 13032306505 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108321024, 108328448 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'yellow' },
fill => { color => 'red', transparency => 100 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format24.t 000644 000765 000024 00000004170 13032306505 022245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 115374720, 115389568 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_chartarea( fill => { color => 'yellow', transparency => 75 } );
$chart->set_plotarea( fill => { color => 'red', transparency => 25 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format25.t 000644 000765 000024 00000004033 13032306505 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format25.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108178048, 108319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'red', transparency => 50 }
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format26.t 000644 000765 000024 00000004121 13032306505 022243 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format26.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108652416, 108655744 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => { type => 'linear', 'display_equation' => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_legend( delete_series => [2, 0] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format27.t 000644 000765 000024 00000004534 13032306505 022254 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format27.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108645376, 108655360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'polynomial',
name => 'My trend name',
order => 2,
forward => 0.5,
backward => 0.5,
display_equation => 1,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format28.t 000644 000765 000024 00000004253 13032306505 022253 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format28.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108645376, 108655360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'linear',
display_equation => 1,
display_r_squared => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_legend( delete_series => [0, 2] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format29.t 000644 000765 000024 00000004603 13032306505 022253 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format29.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108652416, 108655744 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'polynomial',
name => 'My trend name',
order => 2,
forward => 0.5,
backward => 0.5,
display_equation => 1,
display_r_squared => 1,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format30.t 000644 000765 000024 00000004260 13032306505 022242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format30.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108652416, 108655744 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'linear',
intercept => 0.8,
display_equation => 1,
display_r_squared => 1
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_legend( delete_series => [0, 2] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_format31.t 000644 000765 000024 00000004645 13032306505 022252 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format31.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 115443200, 115459200 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'polynomial',
name => 'My trend name',
order => 2,
forward => 0.5,
backward => 0.5,
intercept => 1.5,
display_equation => 1,
display_r_squared => 1,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gap01.t 000644 000765 000024 00000004013 13032306505 021513 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45438848, 45470464 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => 5,
gap => 157,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gap02.t 000644 000765 000024 00000004015 13032306505 021516 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470464, 45472000 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => -100,
gap => 0,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gap03.t 000644 000765 000024 00000004016 13032306505 021520 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470464, 45472000 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => 100,
gap => 500,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gap04.t 000644 000765 000024 00000004052 13032306505 021521 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(type => 'column', embedded => 1);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45938176, 59715584 ];
$chart->{_axis2_ids} = [ 62526208, 59718272 ];
my $data = [ [ 1, 2, 3, 4, 5 ],
[ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', gap => 51, overlap => 12 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1, gap => 251, overlap => -27 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gap05.t 000644 000765 000024 00000004135 13032306505 021524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(type => 'bar', embedded => 1);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45938176, 59715584 ];
$chart->{_axis2_ids} = [ 70848512, 54519680 ];
my $data = [ [ 1, 2, 3, 4, 5 ],
[ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', gap => 51, overlap => 12 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1, gap => 251, overlap => -27 );
$chart->set_x2_axis( label_position => 'next_to' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient01.t 000644 000765 000024 00000003757 13032306505 022557 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61365248, 64275200 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ] }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient02.t 000644 000765 000024 00000003774 13032306505 022557 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61363328, 61364864 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ], angle => 30 }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient03.t 000644 000765 000024 00000004024 13032306505 022545 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
$chart->{_axis_ids} = [ 61363328, 61364864 ];
$chart->{_axis_ids} = [ 61363712, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => {
colors => [ '#DDEBCF', '#9CB86E', '#156B13' ],
positions => [ 0, 40, 100 ],
}
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient04.t 000644 000765 000024 00000004027 13032306505 022551 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61363712, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => {
colors => [ '#DDEBCF', '#9CB86E', '#156B13' ],
type => 'radial'
}
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient05.t 000644 000765 000024 00000004034 13032306505 022550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61363712, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => {
colors => [ '#DDEBCF', '#9CB86E', '#156B13' ],
type => 'rectangular'
}
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient06.t 000644 000765 000024 00000004025 13032306505 022551 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61363328, 61364864 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => {
colors => [ '#DDEBCF', '#9CB86E', '#156B13' ],
type => 'path'
}
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient07.t 000644 000765 000024 00000004041 13032306505 022550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68936064, 68937600 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ], },
invert_if_negative => 1
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient08.t 000644 000765 000024 00000004004 13032306505 022550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69014272, 69016192 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_chartarea(
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ] }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient09.t 000644 000765 000024 00000004003 13032306505 022550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159616, 61364480 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->set_plotarea(
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ] }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient10.t 000644 000765 000024 00000003745 13032306505 022554 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#156B13' ] }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient11.t 000644 000765 000024 00000003772 13032306505 022555 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 66738048, 66748416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#DDEBCF', '#9CB86E', '#156B13' ] }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient12.t 000644 000765 000024 00000004034 13032306505 022546 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => {
colors => [ '#DDEBCF', '#156B13' ],
positions => [ 10, 90 ],
}
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gradient13.t 000644 000765 000024 00000003774 13032306505 022561 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gradient13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56159232, 61364096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
gradient => { colors => [ '#DDEBCF', '#9CB86E', '#156B13' ], angle => 355 }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines01.t 000644 000765 000024 00000004015 13032306505 022726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 67390848, 68472192 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines02.t 000644 000765 000024 00000004072 13032306505 022732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 57940608, 57938688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines03.t 000644 000765 000024 00000005302 13032306505 022730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54553600, 54977280 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines04.t 000644 000765 000024 00000003775 13033316460 022747 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54977280, 54978816 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( major_gridlines => { visible => 0},
major_tick_mark => 'cross' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines05.t 000644 000765 000024 00000004152 13032306505 022734 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 80072064, 79959168 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines06.t 000644 000765 000024 00000004227 13032306505 022740 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82812288, 46261376 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines07.t 000644 000765 000024 00000005436 13032306505 022744 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 59313152, 59364096 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines08.t 000644 000765 000024 00000004040 13032306505 022733 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 60019072, 60020608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
major_tick_mark => 'cross',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_gridlines09.t 000644 000765 000024 00000004574 13032306505 022750 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48744320, 49566848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis(
major_gridlines => {
visible => 1,
line => { color => 'red', width => 0.5, dash_type => 'square_dot' }
},
minor_gridlines => {
visible => 1,
line => { color => 'yellow' }
},
);
$chart->set_y_axis(
major_gridlines => {
visible => 1,
line => { width => 1.25, dash_type => 'dash' }
},
minor_gridlines => {
visible => 1,
line => { color => '#00B050' }
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_high_low_lines01.t 000644 000765 000024 00000004007 13032306505 023741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_high_low_lines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with high-low lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49018368, 49019904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_high_low_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_high_low_lines02.t 000644 000765 000024 00000004132 13032306505 023741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_high_low_lines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with high-low lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61180928, 63898368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_high_low_lines(
line => {
color => 'red',
dash_type => 'square_dot'
}
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout01.t 000644 000765 000024 00000004205 13032306505 022264 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198592, 69200128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_plotarea(
layout => {
x => 0.13171062992125984,
y => 0.26436351706036748,
width => 0.73970734908136482,
height => 0.5713732137649461,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout02.t 000644 000765 000024 00000004204 13032306505 022264 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68311296, 69198208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend(
layout => {
x => 0.80197353455818021,
y => 0.37442403032954213,
width => 0.12858202099737534,
height => 0.25115157480314959,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout03.t 000644 000765 000024 00000004244 13032306505 022271 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68312064, 69198592 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend(
position => 'overlay_right',
layout => {
x => 0.80197353455818043,
y => 0.3744240303295423,
width => 0.12858202099737534,
height => 0.25115157480314959,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout04.t 000644 000765 000024 00000004113 13032306505 022265 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68311296, 69198208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
layout => {
x => 0.42631933508311465,
y => 0.14351851851851852,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout05.t 000644 000765 000024 00000004463 13032306505 022276 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43495808, 43497728 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis(
name => 'XXX',
name_layout => {
x => 0.34620319335083105,
y => 0.85090259550889469,
}
);
$chart->set_y_axis(
name => 'YYY',
name_layout => {
x => 0.21388888888888888,
y => 0.26349919801691457,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout06.t 000644 000765 000024 00000004125 13032306505 022272 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43496576, 45486080 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
overlay => 1,
layout => {
x => 0.42354155730533688,
y => 0.16203703703703703,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout07.t 000644 000765 000024 00000004142 13032306505 022272 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45861120, 45867008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name_formula => '=Sheet1!$A$1', data => [1],
layout => {
x => 0.359652668416448,
y => 0.1388888888888889,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_layout08.t 000644 000765 000024 00000004154 13032306505 022276 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46317568, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name_formula => '=Sheet1!$A$1', data => [1],
overlay => 1,
layout => {
x => 0.359652668416448,
y => 0.16203703703703703,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_legend01.t 000644 000765 000024 00000003737 13032306505 022216 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_legend01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with legend options.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54461952, 54463872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( position => 'none' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_legend02.t 000644 000765 000024 00000003727 13032306505 022216 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_legend01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with legend options.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54461952, 54463872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( none => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_line01.t 000644 000765 000024 00000003642 13032306505 021702 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43408000, 43434368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_line02.t 000644 000765 000024 00000003777 13032306505 021714 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63593856, 63612032 ];
$chart->{_axis2_ids} = [ 63615360, 63613568 ];
my $data = [ #
[ 1, 2, 3, 4, 5 ],
[ 6, 8, 6, 4, 2 ]
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_line03.t 000644 000765 000024 00000003660 13032306505 021704 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47673728, 47675264 ];
my $data = [
[ 5, 2, 3, 4, 3 ],
[ 10, 4, 6, 8, 6 ],
[ 15, 6, 9, 12, 9 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', smooth => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_line04.t 000644 000765 000024 00000003675 13032306505 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47670016, 47671552 ];
my $data = [
[ 5, 2, 3, 4, 3 ],
[ 10, 4, 6, 8, 6 ],
[ 15, 6, 9, 12, 9 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', smooth => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', smooth => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_name01.t 000644 000765 000024 00000003714 13032306505 021673 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New Chart Name'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47335296, 56029952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_name02.t 000644 000765 000024 00000004463 13032306505 021676 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 1'
);
my $chart2 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 2'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 44271104, 45703168 ];
$chart2->{_axis_ids} = [ 80928128, 80934400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'E24', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_name03.t 000644 000765 000024 00000004463 13032306505 021677 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 1'
);
my $chart2 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 2'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 44271104, 45703168 ];
$chart2->{_axis_ids} = [ 80928128, 80934400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'E24', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_order01.t 000644 000765 000024 00000005235 13032306505 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
my $chart2 = $workbook->add_chart(
type => 'bar',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 54976896, 54978432 ];
$chart2->{_axis_ids} = [ 54310784, 54312320 ];
$chart3->{_axis_ids} = [ 69816704, 69818240 ];
$chart4->{_axis_ids} = [ 69816704, 69818240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'E9', $chart2 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_order02.t 000644 000765 000024 00000005237 13032306505 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart2 = $workbook->add_chart(
type => 'bar',
embedded => 1,
);
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 54976896, 54978432 ];
$chart2->{_axis_ids} = [ 54310784, 54312320 ];
$chart3->{_axis_ids} = [ 69816704, 69818240 ];
$chart4->{_axis_ids} = [ 69816704, 69818240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'E9', $chart2 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_order03.t 000644 000765 000024 00000005425 13032306505 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' [ ' [ 'new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'bar' );
my $worksheet3 = $workbook->add_worksheet();
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 67913600, 68169088 ];
$chart2->{_chart}->{_axis_ids} = [ 58117120, 67654400 ];
$chart3->{_axis_ids} = [ 58109952, 68215936 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern01.t 000644 000765 000024 00000004352 13032306505 022427 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 86421504, 86423040 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$3' );
$chart->add_series( values => '=Sheet1!$B$1:$B$3' );
$chart->add_series( values => '=Sheet1!$C$1:$C$3' );
$chart->add_series( values => '=Sheet1!$D$1:$D$3' );
$chart->add_series( values => '=Sheet1!$E$1:$E$3' );
$chart->add_series( values => '=Sheet1!$F$1:$F$3' );
$chart->add_series( values => '=Sheet1!$G$1:$G$3' );
$chart->add_series( values => '=Sheet1!$H$1:$H$3' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern02.t 000644 000765 000024 00000006024 13032306505 022426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 86421504, 86423040 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_5',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_50',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'light_downward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'light_vertical',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'dashed_downward_diagonal',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'zigzag',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'divot',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'small_grid',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern03.t 000644 000765 000024 00000006031 13032306505 022425 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 110902272, 110756608 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_10',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_60',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'light_upward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'light_horizontal',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'dashed_upward_diagonal',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'wave',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'dotted_grid',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'large_grid',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern04.t 000644 000765 000024 00000006042 13032306505 022430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 110902272, 110756608 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_20',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_70',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'dark_downward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'narrow_vertical',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'dashed_horizontal',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'diagonal_brick',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'dotted_diamond',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'small_check',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern05.t 000644 000765 000024 00000006033 13032306505 022431 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 110902272, 110756608 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_25',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_75',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'dark_upward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'narrow_horizontal',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'dashed_vertical',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'horizontal_brick',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'shingle',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'large_check',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern06.t 000644 000765 000024 00000006022 13032306505 022430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 110902272, 110756608 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_30',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_80',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'wide_downward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'dark_vertical',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'small_confetti',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'weave',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'trellis',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'outlined_diamond',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern07.t 000644 000765 000024 00000006016 13032306505 022434 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 110902272, 110756608 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_40',
fg_color => '#C00000',
bg_color => '#FFFFFF'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_90',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'wide_upward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'dark_horizontal',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'large_confetti',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'plaid',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'sphere',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'solid_diamond',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern08.t 000644 000765 000024 00000006017 13032306505 022436 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 91631616, 91633152 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
pattern => {
pattern => 'percent_5',
fg_color => 'yellow',
bg_color => 'red'
}
);
$chart->add_series(
values => '=Sheet1!$B$1:$B$3',
pattern => {
pattern => 'percent_50',
fg_color => '#FF0000',
}
);
$chart->add_series(
values => '=Sheet1!$C$1:$C$3',
pattern => {
pattern => 'light_downward_diagonal',
fg_color => '#FFC000',
}
);
$chart->add_series(
values => '=Sheet1!$D$1:$D$3',
pattern => {
pattern => 'light_vertical',
fg_color => '#FFFF00',
}
);
$chart->add_series(
values => '=Sheet1!$E$1:$E$3',
pattern => {
pattern => 'dashed_downward_diagonal',
fg_color => '#92D050',
}
);
$chart->add_series(
values => '=Sheet1!$F$1:$F$3',
pattern => {
pattern => 'zigzag',
fg_color => '#00B050',
}
);
$chart->add_series(
values => '=Sheet1!$G$1:$G$3',
pattern => {
pattern => 'divot',
fg_color => '#00B0F0',
}
);
$chart->add_series(
values => '=Sheet1!$H$1:$H$3',
pattern => {
pattern => 'small_grid',
fg_color => '#0070C0',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern09.t 000644 000765 000024 00000004570 13032306505 022441 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 115359744, 115361280 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$3' );
$chart->add_series( values => '=Sheet1!$B$1:$B$3' );
$chart->add_series( values => '=Sheet1!$C$1:$C$3' );
$chart->add_series( values => '=Sheet1!$D$1:$D$3' );
$chart->add_series( values => '=Sheet1!$E$1:$E$3' );
$chart->add_series( values => '=Sheet1!$F$1:$F$3' );
$chart->add_series( values => '=Sheet1!$G$1:$G$3' );
$chart->add_series( values => '=Sheet1!$H$1:$H$3' );
$chart->set_chartarea(
pattern => {
pattern => 'percent_5',
fg_color => 'red',
bg_color => 'yellow',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pattern10.t 000644 000765 000024 00000004567 13032306505 022437 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pattern10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 143227136, 143245312 ];
my $data = [
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
[ 2, 2, 2 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$3' );
$chart->add_series( values => '=Sheet1!$B$1:$B$3' );
$chart->add_series( values => '=Sheet1!$C$1:$C$3' );
$chart->add_series( values => '=Sheet1!$D$1:$D$3' );
$chart->add_series( values => '=Sheet1!$E$1:$E$3' );
$chart->add_series( values => '=Sheet1!$F$1:$F$3' );
$chart->add_series( values => '=Sheet1!$G$1:$G$3' );
$chart->add_series( values => '=Sheet1!$H$1:$H$3' );
$chart->set_plotarea(
pattern => {
pattern => 'percent_5',
fg_color => 'red',
bg_color => 'yellow',
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pie01.t 000644 000765 000024 00000003310 13032306505 021520 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pie02.t 000644 000765 000024 00000003423 13032306505 021526 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( font => { bold => 1, italic => 1, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pie03.t 000644 000765 000024 00000003365 13032306505 021534 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( delete_series => [1] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pie04.t 000644 000765 000024 00000003374 13032306505 021535 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( position => 'overlay_right' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_pie05.t 000644 000765 000024 00000003343 13032306505 021532 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_rotation(45);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points01.t 000644 000765 000024 00000003317 13032306505 022266 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [ [ 2, 5, 4, 1, 7, 4 ] ];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$6',
points => [ { fill => { color => 'red' } } ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points02.t 000644 000765 000024 00000003461 13032306505 022267 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [ [ 2, 5, 4, 1, 7, 4 ] ];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$6',
points => [
undef, { border => { color => 'red', dash_type => 'square_dot' } },
undef, { fill => { color => 'yellow' } }
],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points03.t 000644 000765 000024 00000003705 13032306505 022271 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
# Replicate the cutom colors for testing.
$workbook->set_custom_color( 40, 0xCC, 0x00, 0x00 );
$workbook->set_custom_color( 41, 0x99, 0x00, 0x00 );
my $data = [ 2, 5, 4, ];
$worksheet->write_col( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
points => [
{ fill => { color => '#FF0000' } },
{ fill => { color => '#CC0000' } },
{ fill => { color => '#990000' } },
],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points04.t 000644 000765 000024 00000004226 13032306505 022271 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48542464, 46807296 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
points => [
{ fill => { color => 'red' } },
{ fill => { color => 'yellow' } }
],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
points => [ undef, undef, { fill => { color => 'yellow' } } ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points05.t 000644 000765 000024 00000004156 13032306505 022274 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45471616, 46804992 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
points => [ { fill => { color => 'red' } } ],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'automatic' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_points06.t 000644 000765 000024 00000004160 13032306505 022270 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 71050368, 71051904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
points => [ { fill => { color => 'red' } } ],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'automatic' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_radar01.t 000644 000765 000024 00000003644 13032306505 022046 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56801152, 56802688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_radar02.t 000644 000765 000024 00000003714 13032306505 022045 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'radar',
embedded => 1,
subtype => 'with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48543616, 48545152 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_radar03.t 000644 000765 000024 00000003706 13032306505 022047 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'radar',
embedded => 1,
subtype => 'filled'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56802304, 56845440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter01.t 000644 000765 000024 00000003723 13032306505 022420 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40262272, 40260352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter02.t 000644 000765 000024 00000004011 13032306505 022410 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54514816, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter03.t 000644 000765 000024 00000003774 13032306505 022430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54010624, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter04.t 000644 000765 000024 00000004007 13032306505 022417 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54011008, 45706240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter05.t 000644 000765 000024 00000003772 13032306505 022430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54011776, 54010240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter06.t 000644 000765 000024 00000004105 13032306505 022420 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 57708544, 44297600 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( minor_unit => 1, major_unit => 3 );
$chart->set_y_axis( minor_unit => 2, major_unit => 4 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter07.t 000644 000765 000024 00000004236 13032306505 022426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63597952, 63616128 ];
$chart->{_axis2_ids} = [ 63617664, 63619456 ];
my $data = [
[ 27, 33, 44, 12, 1 ],
[ 6, 8, 6, 4, 2 ],
[ 20, 10, 30, 50, 40 ],
[ 0, 27, 23, 30, 40 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$C$1:$C$5',
values => '=Sheet1!$D$1:$D$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter08.t 000644 000765 000024 00000003725 13032306505 022431 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 103263232, 103261696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$6',
values => '=Sheet1!$B$2:$B$6',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$6',
values => '=Sheet1!$C$2:$C$6',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter09.t 000644 000765 000024 00000004034 13032306505 022424 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45953024, 45954944 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
smooth => 0,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter10.t 000644 000765 000024 00000004017 13032306505 022415 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 84754816, 84756352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
smooth => 0,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter11.t 000644 000765 000024 00000004036 13032306505 022417 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47439232, 47670400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
smooth => 1,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter12.t 000644 000765 000024 00000004141 13032306505 022415 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69472640, 69216896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter13.t 000644 000765 000024 00000004153 13032306505 022421 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight_with_markers',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69472640, 69216896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'none' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter14.t 000644 000765 000024 00000004231 13032306505 022417 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69216512, 69214976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'star', size => 5 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'plus', size => 5 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_scatter15.t 000644 000765 000024 00000003751 13032306505 022426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 58843520, 58845440 ];
my $data = [
[ 'X', 1, 3 ],
[ 'Y', 10, 30 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$3',
values => '=Sheet1!$B$2:$B$3',
);
$chart->set_x_axis( name => '=Sheet1!$A$1',
name_font => { italic => 1, baseline => -1 });
$chart->set_y_axis( name => '=Sheet1!$B$1' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_size01.t 000644 000765 000024 00000003716 13032306505 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_size( width => 512, height => 320 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_size02.t 000644 000765 000024 00000003741 13032306505 021726 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_size( x_scale => 1.066666666, y_scale => 1.11111111 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_size03.t 000644 000765 000024 00000003674 13032306505 021734 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx3_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart, 0, 0, 1.066666666, 1.11111111 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_size04.t 000644 000765 000024 00000003717 13032306505 021733 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73773440, 73774976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_size( x_offset => 8, y_offset => 9 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_size05.t 000644 000765 000024 00000003643 13032306505 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx5_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73773440, 73774976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart, 8, 9 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_sparse01.t 000644 000765 000024 00000004030 13032306505 022240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_sparse01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46202880, 46204416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, undef, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$6',
values => '=Sheet1!$C$1:$C$6',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_stock01.t 000644 000765 000024 00000005103 13032306505 022070 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_stock01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40522880, 40524416 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_stock02.t 000644 000765 000024 00000005506 13032306505 022100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_stock02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' [ '
[ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63596416, 63597952 ];
$chart->{_axis2_ids} = [ 51206784, 51204480 ];
my $data = [
[
'2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T',
'2007-01-05T'
],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_str01.t 000644 000765 000024 00000003766 13032306505 021572 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_str01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file when the chart data
# contains strings.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40501632, 40514688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 'Foo', 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A6', 'Foo' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_str02.t 000644 000765 000024 00000004002 13032306505 021553 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_str02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file when the chart data
# contains strings.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 41671680, 41669376 ];
my $data = [
[ 1, 2, 'Foo', 4, 5 ],
[ 2, 4, 'Bar', 8, 10 ],
[ 3, 6, 'Baz', 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_table01.t 000644 000765 000024 00000003725 13032306505 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), Decemeber 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_table01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chart axis table properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355520, 61357056 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the default table.
$chart->set_table();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_table02.t 000644 000765 000024 00000004051 13032306505 022036 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), Decemeber 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_table02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chart axis table properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61354368, 61355904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the default table.
$chart->set_table(
vertical => 0,
horizontal => 0,
outline => 0,
show_keys => 1
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_table03.t 000644 000765 000024 00000004236 13032306505 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), Decemeber 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_table03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {'xl/charts/chart1.xml' => ['a:pPr'] };
###############################################################################
#
# Test Excel::Writer::XLSX chart axis table properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 108636032, 108643840 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the default table.
$chart->set_table(
vertical => 0,
horizontal => 0,
outline => 0,
show_keys => 1,
font => { bold => 1, italic => 1, color => 'red', baseline => -1 }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_title01.t 000644 000765 000024 00000003570 13032306505 022074 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_title01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with default title.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46165376, 54462720 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', name => 'Foo' );
$chart->set_title( none => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_title02.t 000644 000765 000024 00000003557 13032306505 022102 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_title02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with default title.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73655040, 73656576 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5');
$chart->set_title( name => 'Title!' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_up_down_bars01.t 000644 000765 000024 00000004001 13032306505 023423 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with up-down bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46808448, 49289856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_up_down_bars();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_up_down_bars02.t 000644 000765 000024 00000004406 13032306505 023435 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with up-down bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49019136, 49222016 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 5, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_up_down_bars(
up => {
fill => { color => 'red' },
line => { color => 'yellow' }
},
down => {
fill => { color => '#00B050' },
border => {
color => '#00B0F0',
dash_type => 'square_dot'
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chart_up_down_bars03.t 000644 000765 000024 00000005173 13032306505 023440 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45472768, 49017216 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_up_down_bars();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet01.t 000644 000765 000024 00000003722 13032306505 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 79858304, 79860096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet02.t 000644 000765 000024 00000004032 13032306505 021717 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 79858304, 79860096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$worksheet2->select();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet03.t 000644 000765 000024 00000003716 13032306505 021730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43794816, 43796352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->hide();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet04.t 000644 000765 000024 00000003721 13032306505 021725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43913216, 43914752 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->protect();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet05.t 000644 000765 000024 00000003726 13032306505 021733 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43695104, 43787008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_zoom( 75 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet06.t 000644 000765 000024 00000003736 13032306505 021735 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43778432, 43780352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_tab_color( 'red' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet07.t 000644 000765 000024 00000004455 13032306505 021735 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/chartsheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' [' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43911040, 46363392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_paper( 9 );
$chart->set_portrait();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet08.t 000644 000765 000024 00000005153 13032306505 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/chartsheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' [' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 46320256, 46335872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_margin_left ( '0.70866141732283472' );
$chart->set_margin_right ( '0.70866141732283472' );
$chart->set_margin_top ( '0.74803149606299213' );
$chart->set_margin_bottom( '0.74803149606299213' );
$chart->set_header( 'Page &P', '0.51181102362204722' );
$chart->set_footer( '&A' , '0.51181102362204722' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/chartsheet09.t 000644 000765 000024 00000004077 13032306505 021737 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 49044480, 49055232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
border => { color => 'yellow' },
fill => { color => 'red' },
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment01.t 000644 000765 000024 00000003120 13032306505 021223 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment02.t 000644 000765 000024 00000003202 13032306505 021225 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text' );
$worksheet->write_comment( 'D17', 'More text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment03.t 000644 000765 000024 00000003271 13032306505 021234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'XFD1048576', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment04.t 000644 000765 000024 00000003530 13032306505 021233 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write( 'A1', 'Foo' );
$worksheet1->write_comment( 'B2', 'Some text' );
$worksheet3->write( 'A1', 'Bar' );
$worksheet3->write_comment( 'C7', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment05.t 000644 000765 000024 00000003642 13032306505 021240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => [' 1024.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
for my $row ( 0 .. 127 ) {
for my $col ( 0 .. 15 ) {
$worksheet1->write_comment( $row, $col, 'Some text' );
}
}
$worksheet3->write_comment( 'A1', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment06.t 000644 000765 000024 00000003452 13032306505 021240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text', visible => 1 );
$worksheet->write_comment( 'A4', 'Some text' );
$worksheet->write_comment( 'A5', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment07.t 000644 000765 000024 00000003472 13032306505 021243 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text' );
$worksheet->write_comment( 'A4', 'Some text' );
$worksheet->write_comment( 'A5', 'Some text' );
$worksheet->show_comments();
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment08.t 000644 000765 000024 00000003526 13032306505 021244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text', visible => 0 );
$worksheet->write_comment( 'A4', 'Some text', visible => 1 );
$worksheet->write_comment( 'A5', 'Some text' );
$worksheet->show_comments();
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment09.t 000644 000765 000024 00000003333 13032306505 021241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text', author => 'John' );
$worksheet->write_comment( 'A2', 'Some text', author => 'Perl' );
$worksheet->write_comment( 'A3', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment10.t 000644 000765 000024 00000003206 13032306505 021230 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text', color => 51 );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment11.t 000644 000765 000024 00000003201 13032306505 021224 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet2->write( 'A1', 'Foo' );
$worksheet2->write_comment( 'B2', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/comment12.t 000644 000765 000024 00000003220 13032306505 021226 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(0, 21);
$worksheet->set_column('B:B', 10);
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'A1', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format01.t 000644 000765 000024 00000003634 13032306505 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format(
color => '#9C0006',
bg_color => '#FFC7CE',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format02.t 000644 000765 000024 00000003447 13032306505 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = undef; # Test the null format.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => '<',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format03.t 000644 000765 000024 00000004251 13032306505 022064 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( font_strikeout => 1, dxf_index => 1 );
my $format2 = $workbook->add_format( underline => 1, dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => 'between',
minimum => 2,
maximum => 6,
}
);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format2,
criteria => 'greater than',
value => 1,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format04.t 000644 000765 000024 00000004203 13032306505 022062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( num_format => 2, dxf_index => 1 );
my $format2 = $workbook->add_format( num_format => '0.000', dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '>',
value => 2,
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'cell',
format => $format2,
criteria => '<',
value => 8,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format05.t 000644 000765 000024 00000003462 13032306505 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( border => 1 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '==',
value => 7,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format06.t 000644 000765 000024 00000003556 13032306505 022076 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format(
pattern => 15,
fg_color => '#FF0000',
bg_color => '#FFFF00'
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '>',
value => 7,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format07.t 000644 000765 000024 00000005146 13032306505 022074 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( bg_color => '#FF0000', dxf_index => 1 );
my $format2 = $workbook->add_format( bg_color => '#92D050', dxf_index => 0 );
my $data = [
[ 90, 80, 50, 10, 20, 90, 40, 90, 30, 40 ],
[ 20, 10, 90, 100, 30, 60, 70, 60, 50, 90 ],
[ 10, 50, 60, 50, 20, 50, 80, 30, 40, 60 ],
[ 10, 90, 20, 40, 10, 40, 50, 70, 90, 50 ],
[ 70, 100, 10, 90, 10, 10, 20, 100, 100, 40 ],
[ 20, 60, 10, 100, 30, 10, 20, 60, 100, 10 ],
[ 10, 60, 10, 80, 100, 80, 30, 30, 70, 40 ],
[ 30, 90, 60, 10, 10, 100, 40, 40, 30, 40 ],
[ 80, 90, 10, 20, 20, 50, 80, 20, 60, 90 ],
[ 60, 80, 30, 30, 10, 50, 80, 60, 50, 30 ],
];
$worksheet->write_col( 'A1', $data );
$worksheet->conditional_formatting( 'A1:J10',
{
type => 'cell',
format => $format1,
criteria => '>=',
value => 50,
}
);
$worksheet->conditional_formatting( 'A1:J10',
{
type => 'cell',
format => $format2,
criteria => '<',
value => 50,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format08.t 000644 000765 000024 00000003634 13032306505 022075 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format(
color => '#9C6500',
bg_color => '#FFEB9C',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format09.t 000644 000765 000024 00000003710 13032306505 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx9_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Light yellow fill with dark yellow text.
my $format = $workbook->add_format(
color => '#9C6500',
bg_color => '#FFEB9C',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format10.t 000644 000765 000024 00000003567 13032306505 022073 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bold => 1, italic => 1 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format11.t 000644 000765 000024 00000003633 13032306505 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bg_color => '#FFFF00', fg_color => '#FF0000', pattern => 1 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format12.t 000644 000765 000024 00000003634 13032306505 022070 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bg_color => '#FFFF00', fg_color => '#FF0000', pattern => 12 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format13.t 000644 000765 000024 00000004230 13032306505 022062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx13_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( num_format => 2, dxf_index => 1 );
my $format2 = $workbook->add_format( num_format => '0.000', dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
my $options = {
type => 'cell',
format => $format1,
criteria => '>',
value => 2,
};
$worksheet->conditional_formatting( 'A1', $options );
# Test re-using options, issue #79.
$options->{criteria} = '<';
$options->{value} = 8;
$options->{format} = $format2;
$worksheet->conditional_formatting( 'A2', $options);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format14.t 000644 000765 000024 00000003553 13153601477 022104 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bg_color => 'red' );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5,
stop_if_true => 1
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format15.t 000644 000765 000024 00000004202 13153601571 022070 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( bg_color => 'red' );
my $format2 = $workbook->add_format( bg_color => '#92D050' );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => 'less than',
value => 5,
stop_if_true => 1
}
);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format2,
criteria => 'greater than',
value => 20,
stop_if_true => 1
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format16.t 000644 000765 000024 00000004202 13153602733 022072 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( bg_color => 'red' );
my $format2 = $workbook->add_format( bg_color => '#92D050' );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => 'less than',
value => 5,
stop_if_true => 0
}
);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format2,
criteria => 'greater than',
value => 20,
stop_if_true => 1
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format17.t 000644 000765 000024 00000003336 13157023155 022101 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'icon_set',
icon_style => '3_arrows',
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/cond_format18.t 000644 000765 000024 00000007671 13157023155 022110 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2017, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A12', 75 );
$worksheet->conditional_formatting( 'A1',
{
type => 'icon_set',
icon_style => '3_arrows',
reverse_icons => 1,
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'icon_set',
icon_style => '3_flags',
icons_only => 1,
}
);
$worksheet->conditional_formatting( 'A3',
{
type => 'icon_set',
icon_style => '3_traffic_lights_rimmed',
icons_only => 1,
reverse_icons => 1,
}
);
$worksheet->conditional_formatting( 'A4',
{
type => 'icon_set',
icon_style => '3_symbols_circled',
icons => [ {value => 80},
{value => 20},
],
}
);
$worksheet->conditional_formatting( 'A5',
{
type => 'icon_set',
icon_style => '4_arrows',
icons => [ {criteria => '>'},
{criteria => '>'},
{criteria => '>'},
],
}
);
$worksheet->conditional_formatting( 'A6',
{
type => 'icon_set',
icon_style => '4_red_to_black',
icons => [ {criteria => '>=', type => 'number', value => 90},
{criteria => '<', type => 'percentile', value => 50},
{criteria => '<=', type => 'percent', value => 25},
],
}
);
$worksheet->conditional_formatting( 'A7',
{
type => 'icon_set',
icon_style => '4_traffic_lights',
icons => [ {value => '=$A$12'} ],
}
);
$worksheet->conditional_formatting( 'A8',
{
type => 'icon_set',
icon_style => '5_arrows_gray',
icons => [ {type => 'formula', value => '=$A$12'} ],
}
);
$worksheet->conditional_formatting( 'A9',
{
type => 'icon_set',
icon_style => '5_quarters',
icons => [ { value => 70 },
{ value => 50 },
{ value => 30 },
{ value => 10 },
],
reverse_icons => 1,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/custom_colors01.t 000644 000765 000024 00000003524 13032306505 022464 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'custom_colors01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with custom colours.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->set_custom_color( 40, '#26DA55' );
$workbook->set_custom_color( 41, '#792DC8' );
$workbook->set_custom_color( 42, '#646462' );
my $color1 = $workbook->add_format( bg_color => 40 );
my $color2 = $workbook->add_format( bg_color => 41 );
my $color3 = $workbook->add_format( bg_color => 42 );
$worksheet->write( 'A1', 'Foo', $color1 );
$worksheet->write( 'A2', 'Foo', $color2 );
$worksheet->write( 'A3', 'Foo', $color3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation01.t 000644 000765 000024 00000003045 13032306505 022712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation02.t 000644 000765 000024 00000003231 13032306505 022710 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation03.t 000644 000765 000024 00000004636 13032306505 022723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
# Examples of the maximum input.
my $input_title = 'This is the longest input title1';
my $input_message = 'This is the longest input message ' . ('a' x 221);
my $values = [
"Foobar", "Foobas", "Foobat", "Foobau", "Foobav", "Foobaw", "Foobax",
"Foobay", "Foobaz", "Foobba", "Foobbb", "Foobbc", "Foobbd", "Foobbe",
"Foobbf", "Foobbg", "Foobbh", "Foobbi", "Foobbj", "Foobbk", "Foobbl",
"Foobbm", "Foobbn", "Foobbo", "Foobbp", "Foobbq", "Foobbr", "Foobbs",
"Foobbt", "Foobbu", "Foobbv", "Foobbw", "Foobbx", "Foobby", "Foobbz",
"Foobca", "End"
];
$worksheet->data_validation(
'D6',
{
validate => 'list',
value => $values,
input_title => $input_title,
input_message => $input_message,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation04.t 000644 000765 000024 00000005102 13032306505 022711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_4$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
# The following should be rejected because the input title is too long.
my $input_title = 'This is the longest input title12';
my $input_message = 'This is the longest input message ' . ('a' x 221);
my $values = [
"Foobar", "Foobas", "Foobat", "Foobau", "Foobav", "Foobaw", "Foobax",
"Foobay", "Foobaz", "Foobba", "Foobbb", "Foobbc", "Foobbd", "Foobbe",
"Foobbf", "Foobbg", "Foobbh", "Foobbi", "Foobbj", "Foobbk", "Foobbl",
"Foobbm", "Foobbn", "Foobbo", "Foobbp", "Foobbq", "Foobbr", "Foobbs",
"Foobbt", "Foobbu", "Foobbv", "Foobbw", "Foobbx", "Foobby", "Foobbz",
"Foobca", "End"
];
# Catch and ignore the warning during testing.
local $SIG{__WARN__} = sub {};
eval {
$worksheet->data_validation(
'D6',
{
validate => 'list',
value => $values,
input_title => $input_title,
input_message => $input_message,
}
);
};
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation05.t 000644 000765 000024 00000005101 13032306505 022711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_5$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
# The following should be rejected because the input title is too long.
my $input_title = 'This is the longest input title1';
my $input_message = 'This is the longest input message ' . ('a' x 222);
my $values = [
"Foobar", "Foobas", "Foobat", "Foobau", "Foobav", "Foobaw", "Foobax",
"Foobay", "Foobaz", "Foobba", "Foobbb", "Foobbc", "Foobbd", "Foobbe",
"Foobbf", "Foobbg", "Foobbh", "Foobbi", "Foobbj", "Foobbk", "Foobbl",
"Foobbm", "Foobbn", "Foobbo", "Foobbp", "Foobbq", "Foobbr", "Foobbs",
"Foobbt", "Foobbu", "Foobbv", "Foobbw", "Foobbx", "Foobby", "Foobbz",
"Foobca", "End"
];
# Catch and ignore the warning during testing.
local $SIG{__WARN__} = sub {};
eval {
$worksheet->data_validation(
'D6',
{
validate => 'list',
value => $values,
input_title => $input_title,
input_message => $input_message,
}
);
};
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation06.t 000644 000765 000024 00000005102 13032306505 022713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_6$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'list',
value => [ 'Foo', 'Bar', 'Baz' ],
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
# The following should be rejected because the input title is too long.
my $input_title = 'This is the longest input title1';
my $input_message = 'This is the longest input message ' . ('a' x 221);
my $values = [
"Foobar", "Foobas", "Foobat", "Foobau", "Foobav", "Foobaw", "Foobax",
"Foobay", "Foobaz", "Foobba", "Foobbb", "Foobbc", "Foobbd", "Foobbe",
"Foobbf", "Foobbg", "Foobbh", "Foobbi", "Foobbj", "Foobbk", "Foobbl",
"Foobbm", "Foobbn", "Foobbo", "Foobbp", "Foobbq", "Foobbr", "Foobbs",
"Foobbt", "Foobbu", "Foobbv", "Foobbw", "Foobbx", "Foobby", "Foobbz",
"Foobca", "End1"
];
# Catch and ignore the warning during testing.
local $SIG{__WARN__} = sub {};
eval {
$worksheet->data_validation(
'D6',
{
validate => 'list',
value => $values,
input_title => $input_title,
input_message => $input_message,
}
);
};
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/data_validation08.t 000644 000765 000024 00000003146 13032306505 022723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'data_validation08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file data validation.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->data_validation(
'C2',
{
validate => 'any',
input_title => 'This is the input title',
input_message => 'This is the input message',
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/date_1904_01.t 000644 000765 000024 00000003607 13112151066 021323 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_1904_01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with date times in 1900 and
# 1904 epochs.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( num_format => 14 );
$worksheet->set_column( 'A:A', 12 );
$worksheet->write_date_time( 'A1', '1900-01-01T', $format );
$worksheet->write_date_time( 'A2', '1902-09-26T', $format );
$worksheet->write_date_time( 'A3', '1913-09-08T', $format );
$worksheet->write_date_time( 'A4', '1927-05-18T', $format );
$worksheet->write_date_time( 'A5', '2173-10-14T', $format );
$worksheet->write_date_time( 'A6', '4637-11-26T', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/date_1904_02.t 000644 000765 000024 00000003640 13032306505 021322 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_1904_02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with date times in 1900 and
# 1904 epochs.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_1904();
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( num_format => 14 );
$worksheet->set_column( 'A:A', 12 );
$worksheet->write_date_time( 'A1', '1904-01-01T', $format );
$worksheet->write_date_time( 'A2', '1906-09-27T', $format );
$worksheet->write_date_time( 'A3', '1917-09-09T', $format );
$worksheet->write_date_time( 'A4', '1931-05-19T', $format );
$worksheet->write_date_time( 'A5', '2177-10-15T', $format );
$worksheet->write_date_time( 'A6', '4641-11-27T', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/date_examples01.t 000644 000765 000024 00000004642 13032306505 022406 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_examples01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = ['xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels'];
my $ignore_elements = {};
###############################################################################
#
# Example spreadsheet used in the tutorial.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_column( 'A:A', 30 ); # For extra visibility.
my $number = 41333.5;
$worksheet->write( 'A1', $number ); # 413333.5
my $format2 = $workbook->add_format( num_format => 'dd/mm/yy' );
$worksheet->write( 'A2', $number, $format2 ); # 28/02/13
my $format3 = $workbook->add_format( num_format => 'mm/dd/yy' );
$worksheet->write( 'A3', $number, $format3 ); # 02/28/13
my $format4 = $workbook->add_format( num_format => 'd\\-m\\-yyyy' );
$worksheet->write( 'A4', $number, $format4 ); # 28-2-2013
my $format5 = $workbook->add_format( num_format => 'dd/mm/yy\\ hh:mm' );
$worksheet->write( 'A5', $number, $format5 ); # 28/02/13 12:00
my $format6 = $workbook->add_format( num_format => 'd\\ mmm\\ yyyy' );
$worksheet->write( 'A6', $number, $format6 ); # 28 Feb 2013
my $format7 = $workbook->add_format( num_format => 'mmm\\ d\\ yyyy\\ hh:mm\\ AM/PM' );
$worksheet->write('A7', $number , $format7); # Feb 28 2013 12:00 PM
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_format01.t 000644 000765 000024 00000003131 13032306505 022557 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename,
{default_format_properties => {size => 10}});
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 12.75 );
# Override for testing.
$worksheet->{_original_row_height} = 12.75;
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_row01.t 000644 000765 000024 00000003001 13032306505 022072 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_row02.t 000644 000765 000024 00000003106 13032306505 022101 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( undef, 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
for my $row (1 .. 8) {
$worksheet->set_row( $row, 15 );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_row03.t 000644 000765 000024 00000003103 13032306505 022077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24, 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
for my $row (1 .. 8) {
$worksheet->set_row( $row, 24 );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_row04.t 000644 000765 000024 00000003232 13032306505 022103 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
$worksheet->write_comment( 'C4', 'Hello', y_offset => 22 );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/default_row05.t 000644 000765 000024 00000003161 13032306505 022105 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24, 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
$worksheet->write( 'A20', 'Baz' );
for my $row (1 .. 8, 10 .. 19) {
$worksheet->set_row( $row, 24 );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/defined_name01.t 000644 000765 000024 00000004620 13032306505 022165 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet('Sheet 3');
$worksheet1->print_area( 'A1:E6' );
$worksheet1->autofilter('F1:G1');
$worksheet1->write( 'G1', 'Filter' );
$worksheet1->write( 'F1', 'Auto' );
$worksheet1->fit_to_pages( 2, 2 );
$workbook->define_name( q('Sheet 3'!Bar), q(='Sheet 3'!$A$1) );
$workbook->define_name( q(Abc), q(=Sheet1!$A$1) );
$workbook->define_name( q(Baz), q(=0.98) );
$workbook->define_name( q(Sheet1!Bar), q(=Sheet1!$A$1) );
$workbook->define_name( q(Sheet2!Bar), q(=Sheet2!$A$1) );
$workbook->define_name( q(Sheet2!aaa), q(=Sheet2!$A$1) );
$workbook->define_name( q(_Egg), q(=Sheet1!$A$1) );
$workbook->define_name( q(_Fog), q(=Sheet1!$A$1) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/defined_name02.t 000644 000765 000024 00000003337 13032306505 022172 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet('sheet One');
$workbook->define_name( "Sales", q(='sheet One'!$G$1:$H$10) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/defined_name03.t 000644 000765 000024 00000003333 13032306505 022167 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet('sheet One');
$workbook->define_name( "Sales", q(='sheet One'!G1:H10) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/defined_name04.t 000644 000765 000024 00000005475 13032306505 022201 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use utf8;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with defined names.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test for valid Excel defined names.
$workbook->define_name( q(\\__), q(=Sheet1!$A$1) );
$workbook->define_name( q(a3f6), q(=Sheet1!$A$2) );
$workbook->define_name( q(afoo.bar), q(=Sheet1!$A$3) );
$workbook->define_name( q(УЉtude), q(=Sheet1!$A$4) );
$workbook->define_name( q(eУЉsumУЉ), q(=Sheet1!$A$5) );
$workbook->define_name( q(a), q(=Sheet1!$A$6) );
# The following are not valid Excel names and shouldn't be written to
# the output file. We also catch the warnings and ignore them.
local $SIG{__WARN__} = sub {};
eval {
$workbook->define_name( q(.abc), q(=Sheet1!$B$1) );
$workbook->define_name( q(GFG$), q(=Sheet1!$B$1) );
$workbook->define_name( q(A1), q(=Sheet1!$B$1) );
$workbook->define_name( q(XFD1048576), q(=Sheet1!$B$1) );
$workbook->define_name( q(1A), q(=Sheet1!$B$1) );
$workbook->define_name( q(A A), q(=Sheet1!$B$1) );
$workbook->define_name( q(c), q(=Sheet1!$B$1) );
$workbook->define_name( q(r), q(=Sheet1!$B$1) );
$workbook->define_name( q(C), q(=Sheet1!$B$1) );
$workbook->define_name( q(R), q(=Sheet1!$B$1) );
$workbook->define_name( q(R1), q(=Sheet1!$B$1) );
$workbook->define_name( q(C1), q(=Sheet1!$B$1) );
$workbook->define_name( q(R1C1), q(=Sheet1!$B$1) );
$workbook->define_name( q(R13C99), q(=Sheet1!$B$1) );
};
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes01.t 000644 000765 000024 00000004054 13032306505 021213 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet('5&4');
$worksheet->write_formula( 'A1', q{=IF(1>2,0,1)}, undef, 1 );
$worksheet->write_formula( 'A2', q{=CONCATENATE("'","<>&")}, undef, q{'<>&} );
$worksheet->write_formula( 'A3', q{=1&"b"}, undef, q{1b} );
$worksheet->write_formula( 'A4', q{="'"}, undef, q{'} );
$worksheet->write_formula( 'A5', q{=""""}, undef, q{"} );
$worksheet->write_formula( 'A6', q{="&" & "&"}, undef, q{&&} );
$worksheet->write_string( 'A8', q{"&<>} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes02.t 000644 000765 000024 00000003236 13032306505 021215 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', q{"<>'&} );
$worksheet->write_comment( 'B2', q{<>&"'} );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( q{I am '"<>&} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes03.t 000644 000765 000024 00000003336 13032306505 021217 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
$worksheet->write( 'A1', 'Foo', $bold );
$worksheet->write( 'A2', 'Bar', $italic );
$worksheet->write_rich_string( 'A3', 'a', $bold, q{b"<>'c}, 'defg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes04.t 000644 000765 000024 00000003034 13032306505 021213 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.com/?a=1&b=2' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes05.t 000644 000765 000024 00000003147 13032306505 021221 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet( "Start" );
my $worksheet2 = $workbook->add_worksheet( "A & B" );
$worksheet1->write_url( 'A1', q(internal:'A & B'!A1), 'Jump to A & B' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes06.t 000644 000765 000024 00000003134 13032306505 021216 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { };
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file a num format that
# require XML escaping.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $num_format = $workbook->add_format( num_format => '[Red]0.0%\\ "a"' );
$worksheet->set_column('A:A', 14);
$worksheet->write( 'A1', 123, $num_format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes07.t 000644 000765 000024 00000003162 13032306505 021220 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', q(http://example.com/!"$%&'( )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/escapes08.t 000644 000765 000024 00000003127 13032306505 021222 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test an already escapted string.
$worksheet->write_url( 'A1', 'http://example.com/%5b0%5d', 'http://example.com/[0]' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style01.t 000644 000765 000024 00000002656 13032306505 022423 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style02.t 000644 000765 000024 00000003443 13032306505 022417 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->set_paper(9);
my $bold = $workbook->add_format( bold => 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A2', 'Bar', $bold );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style03.t 000644 000765 000024 00000003552 13032306505 022421 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->set_paper(9);
$worksheet->set_header( 'Page &P' );
$worksheet->set_footer( '&A' );
my $bold = $workbook->add_format( bold => 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A2', 'Bar', $bold );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style04.t 000644 000765 000024 00000002752 13032306505 022423 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->write('A1', 'Foo');
$worksheet->set_row(0, 21);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style05.t 000644 000765 000024 00000003157 13032306505 022424 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/drawings/drawing1.xml' => [
'', ''
],
};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'B3', $dir . 'images/red.jpg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style06.t 000644 000765 000024 00000003165 13032306505 022424 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/drawings/drawing1.xml' => [
'', ''
],
};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'B3', $dir . 'images/red.jpg', 4, 3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style07.t 000644 000765 000024 00000003170 13032306505 022421 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/drawings/drawing1.xml' => [
'', ''
],
};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'B3', $dir . 'images/yellow.jpg', 4, 3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/excel2003_style08.t 000644 000765 000024 00000003126 13032306505 022423 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'excel2003_style08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename, {excel2003_style => 1});
my $worksheet = $workbook->add_worksheet();
my $courier =
$workbook->add_format( font => 'Courier', size => 8, font_family => 3 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A2', 'Bar', $courier );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/filehandle01.t 000644 000765 000024 00000003250 13032306505 021660 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'filehandle01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file as a filehandle.
#
use Excel::Writer::XLSX;
open my $fh, '>', \my $str or die "Failed to open str filehandle: $!";
my $workbook = Excel::Writer::XLSX->new( $fh );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Hello' );
$worksheet->write( 'A2', 123 );
$workbook->close();
open my $out_fh, '>', $got_filename or die "Failed to open out filehandle: $!";
binmode $out_fh;
print $out_fh $str;
close $out_fh;
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/firstsheet01.t 000644 000765 000024 00000004462 13032306505 021753 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'firstsheet01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $worksheet4 = $workbook->add_worksheet();
my $worksheet5 = $workbook->add_worksheet();
my $worksheet6 = $workbook->add_worksheet();
my $worksheet7 = $workbook->add_worksheet();
my $worksheet8 = $workbook->add_worksheet();
my $worksheet9 = $workbook->add_worksheet();
my $worksheet10 = $workbook->add_worksheet();
my $worksheet11 = $workbook->add_worksheet();
my $worksheet12 = $workbook->add_worksheet();
my $worksheet13 = $workbook->add_worksheet();
my $worksheet14 = $workbook->add_worksheet();
my $worksheet15 = $workbook->add_worksheet();
my $worksheet16 = $workbook->add_worksheet();
my $worksheet17 = $workbook->add_worksheet();
my $worksheet18 = $workbook->add_worksheet();
my $worksheet19 = $workbook->add_worksheet();
my $worksheet20 = $workbook->add_worksheet();
$worksheet8->set_first_sheet();
$worksheet20->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/fit_to_page01.t 000644 000765 000024 00000003342 13032306505 022047 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages();
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/fit_to_page02.t 000644 000765 000024 00000003345 13032306505 022053 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/fit_to_page03.t 000644 000765 000024 00000003350 13032306505 022050 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 1, 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/fit_to_page04.t 000644 000765 000024 00000003350 13032306505 022051 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 3, 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/fit_to_page05.t 000644 000765 000024 00000003350 13032306505 022052 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 1, 0 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format01.t 000644 000765 000024 00000003620 13032306505 021056 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet('Data Sheet');
my $worksheet3 = $workbook->add_worksheet();
my $unused1 = $workbook->add_format( bold => 1 );
my $bold = $workbook->add_format( bold => 1 );
my $unused2 = $workbook->add_format( bold => 1 );
my $unued3 = $workbook->add_format( italic => 1 );
$worksheet1->write( 'A1', 'Foo' );
$worksheet1->write( 'A2', 123 );
$worksheet3->write( 'B2', 'Foo' );
$worksheet3->write( 'B3', 'Bar', $bold );
$worksheet3->write( 'C4', 234 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format02.t 000644 000765 000024 00000003641 13032306505 021062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row( 0, 30 );
my $format1 = $workbook->add_format(
font => "Arial",
bold => 1,
locked => 1,
rotation => 0,
align => "left",
valign => "bottom"
);
my $format2 = $workbook->add_format(
font => "Arial",
bold => 1,
locked => 1,
rotation => 90,
align => "center",
valign => "bottom"
);
$worksheet->write( 'A1', 'Foo', $format1 );
$worksheet->write( 'B1', 'Bar', $format2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format03.t 000644 000765 000024 00000003263 13032306505 021063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( bold => 1, fg_color => 'red' );
my $format2 = $workbook->add_format();
# Test the copy method.
$format2->copy($format1);
$format2->set_italic();
$worksheet->write( 'A1', 'Foo', $format1);
$worksheet->write( 'A2', 'Bar', $format2);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format04.t 000644 000765 000024 00000003543 13032306505 021065 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = Excel::Writer::XLSX::Format->new();
my $format2 = $workbook->add_format( bold => 1 ); # Bold should be overwritten.
# Test the copy method.
$format2->copy($format1);
$format2->set_italic();
$format2->set_bold();
$worksheet->write( 'A1', 'Foo', $format2);
$worksheet->conditional_formatting(
'C1:C10',
{
type => 'cell',
criteria => '>',
value => 50,
format => $format2,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format05.t 000644 000765 000024 00000003050 13032306505 021057 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $wrap = $workbook->add_format( text_wrap => 1 );
$worksheet->set_row( 0, 45 );
$worksheet->write( 'A1', "Foo\nBar", $wrap );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format11.t 000644 000765 000024 00000003020 13032306505 021051 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test a vertical and horizontal centered format.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $centered = $workbook->add_format(
align => 'center',
valign => 'vcenter'
);
$worksheet->write( 'B2', 'Foo', $centered );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format12.t 000644 000765 000024 00000003433 13032306505 021062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test a vertical and horizontal centered format.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $top_left_bottom = $workbook->add_format(
left => 1,
top => 1,
bottom => 1,
);
my $top_bottom = $workbook->add_format(
top => 1,
bottom => 1,
);
my $top_left = $workbook->add_format(
left => 1,
top => 1,
);
$worksheet->write( 'B2', 'test', $top_left_bottom );
$worksheet->write( 'D2', 'test', $top_left );
$worksheet->write( 'F2', 'test', $top_bottom );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format13.t 000644 000765 000024 00000003175 13032306505 021066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row( 0, 21 );
my $font_format = $workbook->add_format();
$font_format->set_font( 'B Nazanin' );
$font_format->set_font_family( 0 );
$font_format->set_font_charset( 178 );
$worksheet->write( 'A1', 'Foo', $font_format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/format14.t 000644 000765 000024 00000003026 13032306505 021062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2016, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $center = $workbook->add_format();
$center->set_center_across();
$worksheet->write( 'A1', 'foo', $center );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/formula_results01.t 000644 000765 000024 00000004614 13032306505 023020 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2015, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'formula_results01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml',
'\[Content_Types\].xml',
'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with formula errors.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_formula( 'A1', '1+1', undef, 2 );
$worksheet->write_formula( 'A2', '"Foo"', undef, 'Foo' );
$worksheet->write_formula( 'A3', 'IF(B3,FALSE,TRUE)', undef, 'TRUE' );
$worksheet->write_formula( 'A4', 'IF(B4,TRUE,FALSE)', undef, 'FALSE' );
$worksheet->write_formula( 'A5', '#DIV/0!', undef, '#DIV/0!' );
$worksheet->write_formula( 'A6', '#N/A', undef, '#N/A' );
$worksheet->write_formula( 'A7', '#NAME?', undef, '#NAME?' );
$worksheet->write_formula( 'A8', '#NULL!', undef, '#NULL!' );
$worksheet->write_formula( 'A9', '#NUM!', undef, '#NUM!' );
$worksheet->write_formula( 'A10', '#REF!', undef, '#REF!' );
$worksheet->write_formula( 'A11', '#VALUE!', undef, '#VALUE!' );
$worksheet->write_formula( 'A12', '1/0', undef, '#DIV/0!' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/gridlines01.t 000644 000765 000024 00000003327 13032306505 021552 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'gridlines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->hide_gridlines( 2 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header01.t 000644 000765 000024 00000003026 13032306505 021016 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements =
{ 'xl/worksheets/sheet1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header( '&L&P', undef, { scale_with_doc => 0 } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header02.t 000644 000765 000024 00000003032 13032306505 021014 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements =
{ 'xl/worksheets/sheet1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header( '&L&P', undef, { align_with_margins => 0 } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header03.t 000644 000765 000024 00000003057 13032306505 021024 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements =
{ 'xl/worksheets/sheet1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_footer( '&L&P', undef, { scale_with_doc => 0, align_with_margins => 0 } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image01.t 000644 000765 000024 00000003074 13032306505 022163 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements =
{ 'xl/worksheets/sheet1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header( '&L&G', undef, { image_left => $dir . 'images/red.jpg' } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image02.t 000644 000765 000024 00000003206 13032306505 022161 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {'xl/worksheets/sheet1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header(
'&L&G&C&G',
undef,
{
image_left => $dir . 'images/red.jpg',
image_center => $dir . 'images/blue.jpg'
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image03.t 000644 000765 000024 00000003317 13032306505 022165 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {'xl/worksheets/sheet1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header(
'&L&[Picture]&C&G&R&[Picture]',
undef,
{
image_left => $dir . 'images/red.jpg',
image_center => $dir . 'images/blue.jpg',
image_right => $dir . 'images/yellow.jpg',
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image04.t 000644 000765 000024 00000003277 13032306505 022173 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {'xl/worksheets/sheet1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_footer(
'&L&G&C&G&R&G',
undef,
{
image_left => $dir . 'images/red.jpg',
image_center => $dir . 'images/blue.jpg',
image_right => $dir . 'images/yellow.jpg',
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image05.t 000644 000765 000024 00000003226 13032306505 022166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {'xl/worksheets/sheet1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_header( '&L&G', undef,
{ image_left => $dir . 'images/red.jpg' } );
$worksheet->set_footer( '&L&G', undef,
{ image_left => $dir . 'images/blue.jpg', } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.96/t/regression/header_image06.t 000644 000765 000024 00000003423 13032306505 022166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2014, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'header_image06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/worksheets/sheet1.xml' => [ ' [ '