TSWIT
asked on
How can I export a csv file from Crystal reports without the data suppressed in the detail showing blank commas?
the csv file looks like the below:
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"BMG4491W1001","MIDLAND HOLDINGS",0202161205,,"R", ,"AD",,"2, 261,840,00 0.00","dde nton@twinv est.com",,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"KYG0420V1068","AMVIG HOLDINGS LTDCOM",0202161205,,"R",," AD",,"2,90 7,920,000. 00","ddent on@twinves t.com",,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"BMG4491W1001","MIDLAND HOLDINGS",0202161205,,"R",
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
"KYG0420V1068","AMVIG HOLDINGS LTDCOM",0202161205,,"R",,"
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
,,,,,,,,,,,
Is it a true CSV file that has a header line? If so, please post the header. Otherwise, tell us.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bob McCoy,
That worked perfectly! My .csv file does have an actual header and it worked great.
Thank you for your response and expertise.
King regards
Debbie
That worked perfectly! My .csv file does have an actual header and it worked great.
Thank you for your response and expertise.
King regards
Debbie
Thanks. Glad that worked for you.
ASKER
Hi Bob,
In testing, I discovered that after running this script a few time successfully, I get the following:
At C:\csv\SCTClean.ps1:5 char:2
+ + C:\
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:5 char:3
+ + C:\
+ ~~~
Unexpected token 'C:\' in expression or statement.
At C:\csv\SCTClean.ps1:6 char:2
+ + ~~~
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:6 char:3
+ + ~~~
+ ~~~
Unexpected token '~~~' in expression or statement.
At C:\csv\SCTClean.ps1:7 char:6
+ + CategoryInfo : ObjectNotFound: (C:\:String) [], CommandNotFound
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:7 char:7
+ + CategoryInfo : ObjectNotFound: (C:\:String) [], CommandNotFound
+ ~~~~~~~~~~~~
Unexpected token 'CategoryInfo' in expression or statement.
At C:\csv\SCTClean.ps1:9 char:6
+ + FullyQualifiedErrorId : CommandNotFoundException
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:9 char:7
+ + FullyQualifiedErrorId : CommandNotFoundException
+ ~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'FullyQualifiedErrorId' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordE xception
+ FullyQualifiedErrorId : MissingExpressionAfterOper ator
Any idea?
In testing, I discovered that after running this script a few time successfully, I get the following:
At C:\csv\SCTClean.ps1:5 char:2
+ + C:\
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:5 char:3
+ + C:\
+ ~~~
Unexpected token 'C:\' in expression or statement.
At C:\csv\SCTClean.ps1:6 char:2
+ + ~~~
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:6 char:3
+ + ~~~
+ ~~~
Unexpected token '~~~' in expression or statement.
At C:\csv\SCTClean.ps1:7 char:6
+ + CategoryInfo : ObjectNotFound: (C:\:String) [], CommandNotFound
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:7 char:7
+ + CategoryInfo : ObjectNotFound: (C:\:String) [], CommandNotFound
+ ~~~~~~~~~~~~
Unexpected token 'CategoryInfo' in expression or statement.
At C:\csv\SCTClean.ps1:9 char:6
+ + FullyQualifiedErrorId : CommandNotFoundException
+ ~
Missing expression after unary operator '+'.
At C:\csv\SCTClean.ps1:9 char:7
+ + FullyQualifiedErrorId : CommandNotFoundException
+ ~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'FullyQualifiedErrorId' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordE
+ FullyQualifiedErrorId : MissingExpressionAfterOper
Any idea?
Can you post your script? I don't have any unary operators in my script.
mlmcc