Commit Graph

89 Commits

Author SHA1 Message Date
dfinke
f785fe0566 Merge latest changes 2018-07-15 12:11:58 -04:00
dfinke
49dd9f20ee Removed commented [Uri] code 2018-07-06 09:06:07 -04:00
dfinke
c5270e9a47 Changed to IsWellFormedUriString . Can pass in a uri from csv 2018-07-05 17:19:21 -04:00
jhoneill
892ba5d73f 5 July See readme.md 2018-07-05 17:34:12 +01:00
jhoneill
06986df83a See readme.md 2018-07-05 00:29:28 +01:00
dfinke
91eabeada1 resolved merge conflicts 2018-06-30 20:46:54 -04:00
jhoneill
6c24db9593 Added -PivotTableName to export excel (see also Readme.md) 2018-06-28 12:14:13 +01:00
jhoneill
a3693a7faf Many changes. Detailed on Readme.md under what's new 2018-06-25 14:06:43 +01:00
dfinke
8052b56387 Supports nameing the PivotTable sheet created 2018-06-24 09:31:26 -04:00
jhoneill
f689c84d04 needed to sync
a
2018-06-22 21:36:46 +01:00
jhoneill
d74cce91b6 Added join Worksheet
Moved "MoveTo…" functionality into Add-Worksheet and gave it copy worksheet functionality
Added create new file functionality to Open-ExcelPackage  - requires a -create switch so previous "Open for read if it exists" behaviour is kept. 
Fixed Conditional formatting so background pattern is "None" not "Solid" by default. 
Tidied comments and help in Merge and Compare 
Added Join Worksheet
Added Extra parameters, sanity check and help to New-PivotTableDefinition
2018-06-17 03:15:47 +01:00
jhoneill
520bb079e5 Changes to Export-Excel & New-PivotTableDefinition
Export-Excel.ps1 
* Added MoveToStart, MoveBefore and MoveAfter Parameters 
* Added support for URI item properties. If a property is of type URI it is created as a hyperlink
* Fixed issue where AutoNamedRange, NamedRange, and TableName do not work when appending to a sheet which already contains the range(s) / table  
* Fixed issues when pivottables / charts already exist and an export tries to create them again.   
* Allowed PivotFilter and PivotDataToColumn, ChartHeight/width ChartRow/Column, ChartRow/ColumnPixelOffsets,  to be passed in -PivotTableDefinition and specified when running New-PivotDefinition. 
* Bad column-names specified for Pivots now generate warnings instead of throwing.
* Removed the need to specify a fill type when specifying a title background color
* "flattened out" small "called-once" function , add-title, convert-toNumber and Stop-ExcelProcess.
2018-06-15 10:23:06 +01:00
dfinke
a018df09eb Fix databar example 2018-06-08 12:08:16 -04:00
jhoneill
39a68e71c4 Tidying of case, parameter clarity, removal of aliasess.
Added timeout to send-SqlDataToExcel
Added Merge WorkSheet
Fixed bugs in Compare-Worksheet
2018-05-26 22:24:36 +01:00
Wes Stahler
152627298a Some minor spelling changes to the awesome help. 2018-05-09 20:50:56 -04:00
jhoneill
f703addeb1 Added Compare worksheet
Added Compate-worksheet function (in its own PS1) Updated
ColorCompletion.ps1 to hold argument completers for set row, and set
column, and removed  duplicates from formatting.ps1
Fixed case of Path param in Open-ExcelPackage
Added comments about date format (m/d/yy is trapped and translated to
local date)
2018-05-03 11:30:19 -04:00
jhoneill
da7a70752c Added Compare worksheet
Added Compate-worksheet function (in its own PS1) Updated
ColorCompletion.ps1 to hold argument completers for set row, and set
column, and removed  duplicates from formatting.ps1
Fixed case of Path param in Open-ExcelPackage
Added comments about date format (m/d/yy is trapped and translated to
local date)
2018-04-26 16:19:59 +01:00
JustinGrote
243ba0bb3c Add ReZip Parameter for MSOnline compatability 2018-04-09 14:35:28 -07:00
dfinke
593c586a24 Added -PivotFilter param and code 2018-03-31 08:25:41 -04:00
dfinke
848177c358 fixed spelling #285 2018-02-10 20:14:02 -05:00
dfinke
5e4220bd09 Supports excluding Row Grand Totals 2018-01-02 16:08:00 -05:00
dfinke
dc4b66fffe Two things, checks for $Chart.DataLabel and if the directory for the xlsx path does not exist, it creates it 2017-12-02 12:38:24 -05:00
dfinke
28ddd7de13 Added ReturnRange param 2017-11-24 14:13:51 -05:00
jhoneill
9969a94309 Minor Fixes, Set-Row, Set-Column, Send-SQLDataToExcel
Export-Excel :
* Fixed a typo in the message at line 373.
* Now catch an attempt to both clear the sheet and append to it.
* Fixed some issues when appending to sheets where the header isn't in
row 1 or the data doesn't start in column 1.
* Added support for more settings when creating a pivot chart.
* Corrected a typo PivotTableName was PivtoTableName in definition of
New-PivotTableDefinition
Add-ConditionalFormat and Set-Format added to the parameters so each has
the choice of working more like the other.
Added Set-Row and Set-Column - fill a formula down or across.
Added Send-SQLDataToExcel. Insert a rowset and then call Export-Excel
for ranges, charts, pivots etc
2017-11-15 18:04:14 +00:00
dfinke
53b35f9285 Tweaked paramsets 2017-10-30 18:38:25 -04:00
jhoneill
890906ff10 Fixes to formatting , new Export charts tool (requires Excel.exe) help updates and Export excel support for "No data" use
Export-Excel.ps1
1. No code seems to act on the "NoClobber" parameter, I had previously
added a "ClearSheet" parameter which removes the worksheet and any past
data (before if there were fewer rows or columns in the new data, the
old would not be over-written)
2. I have made the whole of the process{} block in export-Excel subject
to IF ($target data)  .... this way things which are processed in the
end{} block can be done in a seperate call to Export-Excel without the
need to load data.  Because of this there should be no need for the Open
and Close -ExcelPackage functions going forward, but I've left them in
place for now
3. Fixed a bug when setting the target range it was previously setting
the end of the range to be the number of columns which failed if the
data was inserted at a column other than one.
4. I've moved the top left corner of a pivot chart so it sits closer to
the data.
5. I've change the check for inserting a pivot table so if
-InsertPivotChart is specified it implies -insertPivotTable.

Formatting.
6. The previous check in was not up-to date and contained some issues
with conditional formatting which I had fixed in the past.
7. Fixed a peformance bug in set-format where a foreach intended to
allow the same format to be applied to multiple ranges would format a
large blocks of cells one-by-one if it was the only range passed. .
8. Improved online help for the formatting commands.

Export charts
9. My current project is importing a lot of data into Excel and needs to
take Excel charts out as JPG files. I've thrown in the Export-Charts
script as "something for the pot",  even though the connection with the
rest of work is loose,
2017-10-24 09:02:14 +01:00
jhoneill
bd40cfe829 Append, and formatting
Changed Export-Excel.ps1

#1 @ Line 197 Made new parameter sets . Default, and table already
existed and use path. Added DefaultPackage and TablePackage
A New parameter  "Package" allows an ExcelPackage object returned by
-passThru to be passed in
~Line 400 code to use package or path depending on path passed.

(also added Open-ExcelPackage  to get the object without exporting and
Close-ExcelPackage to close it nicely - these are in their own file)

#2.  @ Line 256 added new parameter excludeProperty to remove unwanted
properties without needing to go through select-object
~Line 459 added logic to exclude the properties specified in the new
parameter

#3 .  @ Line 262 Added new parameter Append
~Line 420 code to read the existing headers and move the insertion point
below the current data
(normal behaviour is to check if headers exist when adding data in the
process block, which makes this change wonderfully easy)
~Line 510 changed basis for identifying named ranges and changed scope
for rangeName so it can be used on other sheets

#4.  ~Line 550. Remove any existing Pivot table before trying to
[re]create it.

Added formatting.ps1 which applies conditional and normal formats -
requires an ExcelPackage to be open.

Added Open-ExcelPackage.ps1 (which contains a close function as well to
get the the object and save it )  open allows the sheet to be loaded
into a package object without needing to export .

Updated .psm1 to add the formating and open/close ps1 files.
2017-10-21 18:14:02 +01:00
Doug Finke
954ed8d736 Merge pull request #233 from DarkLite1/master
Fixed zero exported as String instead of numerical
2017-10-17 09:49:22 -04:00
DarkLite1
4823424ae3 Fixed zero exported as String instead of numerical 2017-10-16 13:59:22 +02:00
dfinke
8d6f5521af updated 2017-10-13 15:50:25 -04:00
dfinke
48607e403e Name of pivot table comes from caller 2017-10-12 12:06:16 -04:00
dfinke
57c02a466d works with multiple sheets 2017-10-12 11:33:49 -04:00
dfinke
f5acf88a17 Experiment multiple pivot tables 2017-10-11 19:23:45 -04:00
dfinke
85151f8375 formatted 2017-10-11 18:11:47 -04:00
ili101
06124e12e7 Fix Bug. AutoFilter with TableName corrupted file
Fix Bug, AutoFilter with TableName create corrupted Excel file.
https://github.com/dfinke/ImportExcel/issues/65
You now cannot set AutoFilter and TableName at the same time.
"-Now" will not auto add AutoFilter if TableName set.
2017-10-05 00:02:06 +03:00
Brun
5d70003582 Title fixes 2017-10-02 10:04:13 -04:00
Brun
a3c2a92e33 Header formatting fix when Title is used (Issue #182) 2017-09-20 13:56:06 -04:00
DarkLite1
d8d624ba9c Added the function 'Update-FirstObjectProperties'
Added help text in 'Export-Excel'
Added try/catch to 'Install' and 'InstallModule'
Improved code readability in 'Install' and 'InstallModule'
2017-07-26 13:37:08 +02:00
DarkLite1
e8a027c951 Snall fixe verbose
Verbose for the header was not in the right place
2017-05-19 14:49:14 +02:00
DarkLite1
1cfa5c2115 Small fix for ConvertTo-Number
Forgot to initialize the variable
2017-05-16 12:41:00 +02:00
DarkLite1
2354636edd Major update
Added parameter ‘NoNumberConversion'
- Allows us to pass on data to Excel without trying to parse it as a
number
Some code clean-up:
- Removed repeating code by using functions
- Some syntax clean-up for better readability
- More clear verbose messages
- Improved error handling
Improved help
- Added parameter explanations
- Added more examples
2017-05-15 14:55:04 +02:00
DarkLite1
cd8a57605f Fix for Excel-Export #168
- Changed 'InvariantInfo' to 'CurrentInfo', to respect the systems
regioinal settings
- Added verbose text to see what's happening
2017-02-21 14:59:56 +01:00
DarkLite1
ae9ef78ea0 Fix for Export-Excel #165
Fixed handling of the TableName with parameter validation, we now throw
an error in case the TableName:
- starts with something else then a letter
- is NULL or empty
- Contains spaces
Just like in the orriginal EPPlus.dll library.

Added Try/Catch clause for the End clause. So errors like 'TableName is
not unique' are terminating errors and the function isn't exectued any
further.

Also cleaned up for readability some cosmetic stuff:
- 'if(' to 'if ('
- double quotes to single quotes where needed
2017-02-20 09:46:03 +01:00
DarkLite1
7cdf40e0c8 Added 'Get-ExcelWorkbookInfo' 2017-02-14 09:13:46 +01:00
dfinke
221bc5d215 updated 2016-12-22 12:01:16 -05:00
dfinke
29e44e0aa1 Add scriptblock for Cell Fill Style 2016-12-22 11:24:18 -05:00
headsphere
1cd583ca12 Update Export-Excel.ps1 2016-09-27 11:06:50 +01:00
headsphere
27dea78413 Update Export-Excel.ps1
Fixed problem with conditional formatting code that was breaking in Powershell 3
2016-09-21 13:22:57 +01:00
Attila Mihalicz
dba4768514 uninitialized variable leaks into the pipeline when -TableName parameter is used. 2016-07-07 11:35:42 +02:00
dfinke
3c5020f137 Fixes Casting Error in Export-Excel #108 2016-06-28 15:01:41 -04:00