
- Select excel file that works both for mac and windows vba how to#
- Select excel file that works both for mac and windows vba Pc#
Allen Wyatt is suggesting, I think, that it is one that has a CarriageReturn and LineFeed pair as the thing which separates the lines in the entire long string of the file. Just opening it simply with Excel is likely to catch you out sometimes due to the different formats that might be usedĪbout the right format for a PC…. I think one of the safest things to do is to open a “.csv file” using VBA as an entire long string of the file, than doing some intelligent analysis of it, before putting the values into a worksheet. Just recently I have been tearing my head out trying to help someone on a forum who randomly is supplying some of his test data in “.csv files” with different formats, although at first glance they look the same. Thanks Mike B, and thanks Allen Wyatt for this tip. You should be able to choose either option and have the file work just fine. The Mac includes CSV options for both Windows and MS-DOS systems.

If you are creating the CSV export file on the Mac for later use on the PC, you will want to make sure that you select a CSV format appropriate for the target system.
Select excel file that works both for mac and windows vba Pc#
In the PC world, lines are terminated with a carriage return/line feed combination, which can mess things up on the Macintosh. This option results in a CSV file where each record (each line in the file) is terminated with a carriage return, as expected by the Mac. If your export file is destined for use on a Macintosh, you should choose the second CSV option. The second format, for the Macintosh, is worth noting, however. There are subtle differences between all three formats, but for most people, the first and third formats are essentially the same-they both work on the PC. You can choose any of these CSV options by using the Save As Type drop-down list at the bottom of the Save As dialog box. There are actually three CSV formats included with Excel:
Select excel file that works both for mac and windows vba how to#
When selecting how to export you data, you need to be sure that you pick the export format that is appropriate for the system on which it will be used.

Comma-delimited files are often referred to as CSV (comma-separated value) files, and are often used for exchanging data between programs. Excel allows you to save worksheet data in a comma-delimited format, so you can use it with other programs.
