Prepend a single quote to BOM index to be interpreted as a string in generated spreadsheets

This commit is contained in:
Furgo
2024-10-03 23:49:28 +02:00
committed by Chris Hennes
parent a08d5a4c1e
commit 32e09d9554

View File

@@ -228,7 +228,7 @@ void BomObject::addObjectToBom(App::DocumentObject* obj, size_t row, std::string
size_t col = 0;
for (auto& columnName : columnsNames.getValues()) {
if (columnName == "Index") {
setCell(App::CellAddress(row, col), index.c_str());
setCell(App::CellAddress(row, col), (std::string("'") + index).c_str());
}
else if (columnName == "Name") {
setCell(App::CellAddress(row, col), obj->Label.getValue());