DataRecord component

Hi everyone,
DataRecord component create a file on the SDcard with .data extension.
Someone knows the structure of this file? If I want o export or import data stored in this file using a spreadsheet or other programs how can I do?

Massimo

The .data file can’t be directly accessed because it is exclusively opened by the data record as long as the component is loaded. See it rather as an internal temp or cache file. You can relocate it into the RAM to make it volatile and to start willingly each time with an empty data record at boot.

If you want to import or export data, for example in csv format, you can find some inspiration here: The Sunday Blog: Advanced programming - Nextion HMI as a csv file viewer - Nextion

3 Likes

Thank you Fjodor,
I think I’ll make a

I am writing a small program that will take a .data Nextion file and turn it into a CSV file. If you want a copy to test, send me an email to mlyle@cheapcontrols.com

Hello. You wrote, that it’s possible to relocate file for DataRecord to RAM. I couldn’t find any information about this. Can you explain how to do it? I want to use datarecord with panel without sd card inserted and repopulate data record after startup.
Thank you.

In the Nextion Editor, click on Device, then go to Project and you’ll see Memory file storage size. There you set how many bytes you want reserved. For my project I needed to use four DataRecord components, each .data file with a size of 66048 bytes. So, I set around 270000 bytes of ram to be reserved for those components. For each component change the .path attribute to ram/“name_of_file”.data and that’s it. With each power cycle you’ll have an empty DataRecord.

It seems that there is a minimum amount of memory for this kind (ram/xxx) of storage.
128000 is a good choice, less show an error message