5

The XLS file format has a Country record that stores the locale of the user that saved the file: http://msdn.microsoft.com/en-us/library/dd945969(v=office.12).aspx This is incredibly useful when processing localized number formats.

Is there an equivalent for XLSX? Based on my reading of ECMA-376, there is no workbook-level property.

SheetJS
  • 22,470
  • 12
  • 65
  • 75

2 Answers2

-1

Have you tried using VBA to get the user's IP? I found this post: How to retrieve this computer's IP address?

You would then need cross reference results to determine the country of the IP.

Community
  • 1
  • 1
  • The user that saved the file could be using a completely different locale than the one that is using the file at that moment. – Tommaso Ercole Jul 28 '20 at 20:34
-2

Unfortunately this was removed in the transition to .xlsx.

The .xls file format followed BIFF and therefore had the ability to store binary information directly in the file. The newer .xlsx file format follows the Open Office XML file format, which is text based and cannot store the same information.

  • To clarify, I think @user3716271 meant "Office *Open XML*" format rather than "*Open Office* XML" – Luis Jul 18 '14 at 18:30
  • "Office XML file format, which is text based and cannot store the same information." It would have been simple to just store the raw number as ASCII (after all, that's essentially what happens with the shared string table). The record literally has two 16 bit integers. – SheetJS Jul 19 '14 at 00:31