Question : Query to export to Excel

Experts,

I need some help please!

I have an Excel spreadsheet that I am importing into Access.  It contains these fields:
ItemSoldCnt
Mfg
Model
AvgSalePrice
SalesPrsn

Each row in Excel is a record of one item sold for one salesperson.  The ItemSoldCnt may indicate 10 with an AvgSalePrice of 200.  If more than one salesperson sold that item, the next row may indicate 5 in ItemSoldCnt with an AvgSalePrice of 150, or if the salesperson didn’t sell that item there will not be a record.  Then the next item sold, etc.

Ideally, I would like a query that can be exported to Excel that would sort by the best selling item by quantity (total sold by all salespeople) have one line for each item, but include the salesperson, qty sold by salesperson and price.  As not all items were sold by each salesperson, if possible, it would indicate 0 if an item was not sold by a salesperson.  If it can only be done as a report, that is fine.  Hope this made sense.  Thank you for your help.

Answer : Query to export to Excel

I switched the order of ' and " and now it seems to work:

-command "New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://yourexchangeserverFQDN/PowerShell/ -Authentication Kerberos; $s = Get-PSSession; Import-PSSession -Session $s; Get-MailboxStatistics -Server SERVERNAME | select-object DisplayName,TotalItemSize,ItemCount,StorageLimitStatus | export-Csv 'T:\Rockbridge Network Documentation\50 Reporting\Email & Archiving\Monthly CSV File\data.csv'"

If it still does not work then try put the full path for the program:
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Random Solutions  
 
programming4us programming4us