New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Excel fixes for issues #92, #52, #41, #33. #101
Conversation
These changes fix issues #92, #52, #41, #33. Export-Excel.Impl.ps1: Implementation details for the new Export-Excel contributions. Export-Excel.Impl.Tests.ps1: Tests for the implementation details. Export-Excel.ps1: Export-Excel is now a Cmdlet (supports -Verbose parameter). Added -DateTimeFormat and -ColumnOptions parameters. Extracted value and format code into New-CellData function. Export-Excel.Tests.ps1: Updated module import. Issues.Tests.ps1: Contains a test for every issue fixed.
Wow! I'd prefer not to have Any chance you could add ps1 files in the Examples folder showing this off? Thanks again |
No problem, as soon as I get a chance, I'll do that. I don't know how to make the gif videos. What app do you use? |
No rush. If you want to do the animations that'd be cool, was just mentioning it so I'd remember to do it. I use gifcam |
I have detected a few conversion issues when using my own excel datasets, so I'll continue to work on this functionality in my number_formats branch. My 'experimental' branch is a merge of everything I need in ImportExcel. I'll let you know when I feel more confident about the changes. But at least this gives you an opportunity to inspect the code and offer suggestions. Thanks dfinke! |
Some very good stuff in here, great job Willie. Looking forward to seeing some of this merged. |
OK. I think I misread @W1M0R last comment. So this PR can be merged? And he is doing more checking on code in his branch? |
Let's leave it open. No need to set it up again later. |
Hello, Has this been merged? |
No. The person working it through didn't pick it break up. What were you looking for? |
Hi doug, also chiming in here, the leading zero issue was my primary concern. Was that fixed in the main stream? |
Unfortunately no. This was a large change submitted and the person providing it had to move on to other things before we could vet all of it and merge.
Get Outlook for Android<https://aka.ms/ghei36>
On Tue, Jan 17, 2017 at 7:06 AM -0500, "David Johnson" <notifications@github.com<mailto:notifications@github.com>> wrote:
Hi doug, also chiming in here, the leading zero issue was my primary concern. Was that fixed in the main stream?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#101 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAEGumMJmrMzzvOASLLub2vmagpNgpvEks5rTK67gaJpZM4IUL52>.
|
Hi Doug, My issue is that long numbers are imported with scientific format. (#92). |
This is actually already done with my previous pull request that is already accepted and merged. This one could be closed as duplicate and implemented. |
Hi DarkLite1, Could you please describe in short how to import numbers without getting the scientific format? Chris |
I think you misunderstood something. This pull request is about @dfinke , we could use the same function used in |
Yes, you are correct. However, it would be very helpful if you could describe the way to export just in case. |
You can find the way to export the numbers when doing |
-------------------------- EXAMPLE 3 -------------------------- $ExcelParams = @{
Path = $env:TEMP + '\Excel.xlsx'
Show = $true
Verbose = $true
}
Remove-Item -Path $ExcelParams.Path -Force -EA Ignore
[PSCustOmobject][Ordered]@{
Date = Get-Date
Formula1 = '=SUM(F2:G2)'
String1 = 'My String'
String2 = 'a'
IPAddress = '10.10.25.5'
Number1 = '07670'
Number2 = '0,26'
Number3 = '1.555,83'
Number4 = '1.2'
Number5 = '-31'
PhoneNr1 = '+32 44'
PhoneNr2 = '+32 4 4444 444'
PhoneNr3 = '+3244444444'
} | Export-Excel @ExcelParams -NoNumberConversion IPAddress, Number1 Exports all data to the Excel file 'Excel.xslx' and tries to convert all values to numbers where possible except |
Thanks! |
@dfinke I think this can be closed now. |
These changes fix issues #92, #52, #41, #33.
Export-Excel.Impl.ps1: Implementation details for the new Export-Excel contributions.
Export-Excel.Impl.Tests.ps1: Tests for the implementation details.
Export-Excel.ps1: Export-Excel is now a Cmdlet (supports -Verbose parameter). Added -DateTimeFormat and -ColumnOptions parameters. Extracted value and format code into New-CellData function.
Export-Excel.Tests.ps1: Updated module import.
Issues.Tests.ps1: Contains a test for every issue fixed.