header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
read excel file
Last Post 17 Jan 2008 05:20 AM by SAPIENScripter. 30 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 2 of 2 << < 12
Author Messages
SAPIENScripterUser is Offline
New Member
New Member
Posts:47

--
17 Jan 2008 05:20 AM
If you can get rid of the first line, can you now import the file as a csv with the earlier suggestions? That would be the best way to get to an object. Otherwise, you would need to create a new custom object and then define new properties using Add-Member. As to how that would all fit in your script would really depend. if you want to do this using PowerShell, then you need to stick to the PowerShell paradigm. And maybe instead of trying to get everything into one monolithic script, break things down into Powershell functions. Have one function take the Excel file and turn it into a CSV file. Then use PowerShell to import the csv. Pipe that output to another PowerShell expression using foreach-object to do something.


Jeffery Hicks
Microsoft PowerShell MVP
http://blog.sapien.com
http://www.scriptinganswers.com

"Those who forget to script are doomed to repeat their work."
You are not authorized to post a reply.
Page 2 of 2 << < 12


Active Forums 4.3
right
footer   footer
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
footer   footer