29#include <wx/filedlg.h>
31#include <wx/wfstream.h>
41 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
45 if( dlg.ShowModal() == wxID_CANCEL )
51 std::vector<std::vector<wxString>>
table;
68 if( !aToFile.IsEmpty() )
70 wxFileOutputStream os( aToFile );
void WriteLines(const std::vector< std::vector< wxString > > &aRows)
Write a vector of rows to the stream.
The base frame for deriving all KiCad main window classes.
bool SaveTabularDataToClipboard(const std::vector< std::vector< wxString > > &aData)
Store tabular data to the system clipboard.
bool GetTabularDataFromClipboard(std::vector< std::vector< wxString > > &aData)
Attempt to get tabular data from the clipboard.
bool AutoDecodeCSV(const wxString &aInput, std::vector< std::vector< wxString > > &aData)
Try to guess the format of a T/CSV file and decode it into aData.
Base window classes and related definitions.
static wxString CsvTsvFileWildcard()
wxString SafeReadFile(const wxString &aFilePath, const wxString &aReadType)
Nominally opens a file and reads it into a string.
void WriteTableToFileOrClipboard(const wxString &aToFile, const std::vector< std::vector< wxString > > &aTable)
Write aTable as CSV to aToFile (if non-empty) or to the system clipboard.
std::optional< std::vector< std::vector< wxString > > > ReadTableFromFileOrClipboard(EDA_BASE_FRAME &aFrame, bool aFromFile)
Read a CSV/TSV table from a file selected via a dialog (aFromFile) or from the system clipboard.
Definition of file extensions used in Kicad.