I am trying to convert a DAT file which has two sheets in it and multiple columns in one sheet. I suspect that it is a binary file as I am not able to open it using a text editor and when I tried to export it into an excel file format using an internal software it showed that the DAT file has two sheets with one sheet containing some header information while the other sheet is in tabular form. I am now trying to convert these DAT files into CSV format using Python because I would like to convert all the files which I am not able to do so using the internal software.
I have tried a few sample codes that I could find here but it doesn't give me the expected results.
df = np.fromfile('test.DAT')
using the code above that somewhat worked, resulting in array forms as below without any header but I expect it to be in a tabular format.
array([6.01347002e-154, 6.01347037e-154, 3.91007023e+097, ...,
0.00000000e+000, 0.00000000e+000, 0.00000000e+000])
I am not sure how to deal with a DAT file that is resulting in 2 sheets when it is exported as an excel file. Any tips or help on this is much appreciated and I hope my question is clear.