tylererhard
New Member
- Joined
- May 31, 2024
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hi all,
I am working on a project that parses data from a zygo interferometer (binary .datx file). I found some MATLAB Code that works well but for what I would like to do I would like this to be in Excel. I'm trying to do something like this but the data I'm parsing does not match the data the MATLAB code outputs... Could someone help point me in the right direction?
Sub LoadZygoBinaryTest()
Dim fileNum As Integer
Dim filename As String
filename = "Q:\16500-16599\16518 Keysight PBS\J6NR8\STEP 1600 - CP FACE B FIGURE\STEP 1600 CP SIDE B SN 17.datx"
fileNum = FreeFile
Open filename For Binary Access Read As #fileNum
Dim data As New Collection
' Read header
Dim magic_number As Long
Get #fileNum, , magic_number
data.Add magic_number, "magic_number"
Dim header_format As Integer
Get #fileNum, , header_format
data.Add header_format, "header_format"
And so on for each variable I'm parsing... Here is the raw .dat file you can use to check the analysis with. .dat file link
Thank you in advance!
Tyler
I am working on a project that parses data from a zygo interferometer (binary .datx file). I found some MATLAB Code that works well but for what I would like to do I would like this to be in Excel. I'm trying to do something like this but the data I'm parsing does not match the data the MATLAB code outputs... Could someone help point me in the right direction?
Sub LoadZygoBinaryTest()
Dim fileNum As Integer
Dim filename As String
filename = "Q:\16500-16599\16518 Keysight PBS\J6NR8\STEP 1600 - CP FACE B FIGURE\STEP 1600 CP SIDE B SN 17.datx"
fileNum = FreeFile
Open filename For Binary Access Read As #fileNum
Dim data As New Collection
' Read header
Dim magic_number As Long
Get #fileNum, , magic_number
data.Add magic_number, "magic_number"
Dim header_format As Integer
Get #fileNum, , header_format
data.Add header_format, "header_format"
And so on for each variable I'm parsing... Here is the raw .dat file you can use to check the analysis with. .dat file link
Thank you in advance!
Tyler