Read Account history into Spread Sheet

 
I am looking for a way to read the account history and get it contents into an Excel spread sheet for analysis.
Trying to let some off line tools do some better trade analysis.
Can this information be accessed through MQL4
 
write whole history into a csv file and then load it into excel.
that's easy, just OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
 
It's crude, but it serves my purpose. I just import from the html report and then sort the remaining data to fit the format for a shell I have that looks at the data. Yeah, automatic would be better, but it's only about 3 steps. This only works with the newer Excel versions that can import tables from HTML.

By the way, that's for account history. If you want to do the market price history, that's different, but can be done also from the history menu.

-Matt