0

I want to open an Excel file with more than 40 GB in Stata, and I used the following command

import delimited "F:\US_TradeMatrix_Part2_ST202109291458_v1.csv ", encoding(UTF-8) clear

but I can't open and edit the Excel file. I'm wondering how to open this kind of super-large file in Stata?

Nick Cox
  • 35,529
  • 6
  • 31
  • 47
  • Does GM mean GB? How many rows and columns in the dataset? What version of Stata are you using? – Nick Cox Aug 08 '22 at 08:05
  • Cross-posted at https://www.statalist.org/forums/forum/general-stata-discussion/general/1676855-how-to-import-extra-large-excel-file-into-stata – Nick Cox Aug 08 '22 at 08:28
  • I'm sorry, the size of the Excel is more than 40GB. There are 10 columns in the datasets, but I don't know the number of rows as the total number of rows exceeds the number of rows displayed by Excel. I'm using Stata 15. – user19715596 Aug 08 '22 at 09:05
  • I think you are saying that you have a .csv file too big to fit into Excel. If so, it is not best described as an Excel file! But you should be able to find out how many rows it has. See e.g. https://stackoverflow.com/questions/5664761/how-to-count-no-of-lines-in-text-file-and-store-the-value-into-a-variable-using . – Nick Cox Aug 08 '22 at 09:46

0 Answers0