0


I am trying to open excel from the command line as:

start excel.exe fileName

I want to specify the cell format to be text before the file is loaded (so numbers are not rounded and displayed as it is). I looked up the options to run excel from cmd and could not find an option to specify a cell format.

Any solutions ?

m.y.m
  • 347
  • 4
  • 27
  • Microsoft didn't add such functionality because - well who knows better than Microsoft, how your data should be formatted/interpreted `:/` (you *can* specify the format, when *importing* data) – Stephan Dec 24 '17 at 11:46
  • I have a column with such large numbers, each number has more than 40 characters. When I open the file, the numbers became rounded and not accurate. I changed the cell format to text but the number is rounded and not displayed correctly in the cell. I found a solution to specify the cells format to text (before importing the data) and then import the data. This worked manually but how I can automate this in terms of programming ? – m.y.m Dec 24 '17 at 12:04
  • Is your file a `csv`? Have you any influence on how it's generated? – Stephan Dec 24 '17 at 12:05
  • It's a text file with tabs "\t" as separators – m.y.m Dec 24 '17 at 12:13
  • 2
    [related](https://stackoverflow.com/questions/165042/stop-excel-from-automatically-converting-certain-text-values-to-dates) – Stephan Dec 24 '17 at 12:19

0 Answers0