Mremoteng: Export to CSV does not create importable files

Created on 2 Jul 2017  路  6Comments  路  Source: mRemoteNG/mRemoteNG

My cluster is EC2 and IPs vary, so i wish to edit the csv file.
for this I export to csv (uneditable in excel, as it uses semi-colon instead of comma

When exporting to File (csv)
The file created cannot be imported back

How to recreate
1) Create a folder, and create some sessions (i have a folder, user/pasword setup in the folder) all children inherit all , and have different IPs.
2) create a folder bellow, call it TEST
3) go to folder you created, export to File select CSV and select c:\temp\t.csv
4) go to TEST folder created in step 2
5) right click the TEST folder, import -> import from file (C:\TEMP\t.csv)
expected: load success
real result: Import failed | An error occurred while importing the file, "C:\tests\a.csv".
|||
|--:|---|
|Operating system | Windows 7 x64 |
|mRemoteNG version| 1.75 aplha 3 |

Enhancement

Most helpful comment

Feeling good about the implementation now. The csv file format had to change a bit since we weren't saving folders completely, just the names. Here are the highlights:

  • Containers (folders) are now serialized completely
  • We now save both the GUID of the connection and the GUID of its parent so they can be recomposed correctly during deserialization
  • Added some inheritance properties that were missing from the serializer

This will be included in the next v1.76 pre-release

All 6 comments

I located the log file this is what is says:

2017-07-02 11:42:09,607 [1] ERROR- App.Import.ImportFromFile() failed:1
Unrecognized file format.

I didn't touch anything, just export and then import

Tentatively scheduled for the next patch release...

did this never worked? or did it break at some point?

Ok, looking a bit better at this, and don't think this ever worked. So, I would re-implement this really.

ServiceStack.Text is the perfect fit, we can even extend this to JSON with the exact same effort!

I've never really used it, but ServiceStack is pretty well established, and it promises something like:

using ServiceStack.Text;

string CsvSerializer.SerializeToString<T>(T value)
void CsvSerializer.SerializeToWriter<T>(T value, TextWriter writer)

T CsvSerializer.DeserializeFromString<T>(string value)
T CsvSerializer.DeserializeFromReader<T>(TextReader reader)

Any considerations on this?

Pushing this out to v1.76 since this will require new functionality

Feeling good about the implementation now. The csv file format had to change a bit since we weren't saving folders completely, just the names. Here are the highlights:

  • Containers (folders) are now serialized completely
  • We now save both the GUID of the connection and the GUID of its parent so they can be recomposed correctly during deserialization
  • Added some inheritance properties that were missing from the serializer

This will be included in the next v1.76 pre-release

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agiz10 picture agiz10  路  4Comments

sparerd picture sparerd  路  3Comments

senseof94 picture senseof94  路  4Comments

mattbob-brock picture mattbob-brock  路  3Comments

PCNerd2001 picture PCNerd2001  路  3Comments