How to save multiple values in a file?

how to save several values in a file, from field n0 to n20 so that I can read it later?

Using files (read as classic file in a classic file system) is only possible on the Intelligent series. There, you can use either the SD card or reserve a part of the RAM as a RAM disk. Then, with Nextion’s file object, things are pretty straightforward.

On the other series, this isn’t possible. You could work around this by having some storage device like a SD card connected to your MCU, having the MCU processing multiple get requests to the Nextion, and doing the file.write() implemented in C/C++