Home

Export to Excel doesn't work without actually having Excel -- why not use csv?

I have a new computer that doesn't have Excel, I have LibreOffice Calc installed instead. The "Export to Excel" option when viewing results in rich text mode doesn't work, says it can't find Excel.

If it would write the file out as CSV and then open with the default CSV handler, it'd work fine.

When I output to a datagrid then I do get a right-click option to output to a CSV file which I can then manually open.

Would be nice if LINQPad handled this situation better so "Export to Excel" worked even without Excel, using whatever handled CSV files if Excel is not found.

Thanks,

Sam

Comments

  • edited April 2015
    Just noticed you mentioned this method in your comment. Sorry I didn't I read carefully. Also, LINQPad doesn't export to xlsx directly, it exports to html. I'm surprised LibreOffice can't handle that. Maybe you just need add an association?

    Dump to a data grid, switch mode via Ctrl + Shift + G, then right-click and you'll have the option to "Export to CSV file".
  • edited April 2015
    LINQPad exports to HTML and then asks Excel to load it because HTML preserves nested data whereas CSV does not.

    Would it help to use LINQPad's Util.ToCSV methods?
  • @JoeAlbahari I thought I'd post here instead of creating a new topic.

    Could you please consider this library? http://epplus.codeplex.com/
    It will create xlsx files really easily (we use it in our software). It would really ease the pain to always transfer the database of the customer to our box to make quick reports.

    Thanks for the great software! We are a happy customer :)
Sign In or Register to comment.