TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Powersell Script for Converting CSV to Excel File
Shridhar Sharma
Jun 15
2015
Code
1.7
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
script.rar
$FileName =
"$env:temp\Report"
# create some CSV data
Get-Process | Export-Csv -UseCulture -Path
"$FileName.csv"
-NoTypeInformation -Encoding UTF8
# load into Excel
$excel = New-Object -ComObject Excel.Application
$excel.Visible = $
true
$excel.Workbooks.Open(
"$FileName.csv"
).SaveAs(
"$FileName.xlsx"
,51)
$excel.Quit()
explorer.exe
"/Select,$FileName.xlsx"
CSV
Excel
powersell