added importing from csv (continued and finished)
This commit is contained in:
parent
8265212c11
commit
ffdece92b4
2 changed files with 4 additions and 4 deletions
|
@ -446,7 +446,7 @@ void MainWindow::onImportSellerExcelActionTriggered()
|
|||
.exec();
|
||||
|
||||
auto filename = QFileDialog::getOpenFileName(this, "Verkäufer importieren", QString(),
|
||||
"Excel Dateien (*.xlsx);CSV Dateien (*.csv)");
|
||||
"Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)");
|
||||
|
||||
if (filename.isEmpty())
|
||||
return;
|
||||
|
@ -454,7 +454,7 @@ void MainWindow::onImportSellerExcelActionTriggered()
|
|||
fs::path filePath(filename.toStdWString());
|
||||
|
||||
std::size_t numImported{};
|
||||
if (case_insensitive_match(filePath.extension().string(), std::string("xslx"))) {
|
||||
if (case_insensitive_match(filePath.extension().string(), std::string(".xlsx"))) {
|
||||
numImported = ExcelReader::readSellersFromFile(filePath, marketplace_.get());
|
||||
} else {
|
||||
numImported = CsvReader::readSellersFromFile(filePath, marketplace_.get());
|
||||
|
|
|
@ -419,7 +419,7 @@ drucken</string>
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>817</width>
|
||||
<height>24</height>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_Datei">
|
||||
|
@ -511,7 +511,7 @@ drucken</string>
|
|||
</action>
|
||||
<action name="importSellerExcelAction">
|
||||
<property name="text">
|
||||
<string>Aus Excel-Datei (initial)</string>
|
||||
<string>Aus Excel/CSV-Datei (initial)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="importSellerJsonAction">
|
||||
|
|
Loading…
Reference in a new issue