Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xlsb] add PtgAreaErr #1240

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/xlsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2382,8 +2382,8 @@ int32_t worksheet_bin(std::string filePath, bool chartsheet, std::string outPath
stHeaderFirst << ": " << stFooterFirst << std::endl;

out << "<headerFooter>" <<
"<oddHeader>" << stHeaderEven <<"</oddHeader>" <<
"<oddFooter>" << stFooterEven <<"</oddFooter>" <<
"<oddHeader>" << stHeader <<"</oddHeader>" <<
"<oddFooter>" << stFooter <<"</oddFooter>" <<
"<firstHeader>" << stHeaderFirst <<"</firstHeader>" <<
"<firstFooter>" << stFooterFirst <<"</firstFooter>" <<
"<evenHeader>" << stHeaderEven <<"</evenHeader>" <<
Expand Down Expand Up @@ -2490,7 +2490,7 @@ int32_t worksheet_bin(std::string filePath, bool chartsheet, std::string outPath
if (fields->fBestFit)
out << " bestFit=\"" << fields->fBestFit << "\"";
if (fields->iOutLevel>0)
out << " outlineLevel=\"" << fields->iOutLevel << "\"";
out << " outlineLevel=\"" << (uint16_t)fields->iOutLevel << "\"";
if (fields->fCollapsed)
out << " collapsed=\"" << fields->fCollapsed << "\"";

Expand Down
20 changes: 20 additions & 0 deletions src/xlsb_funs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,26 @@ std::string rgce(std::string fml_out, std::istream& sas, bool swapit, bool debug
break;
}

case PtgAreaErr:
case PtgAreaErr2:
case PtgAreaErr3:
{
if (debug) Rcpp::Rcout << "PtgAreaErr" <<std::endl;

uint32_t unused1 = 0, unused2 = 0, unused3 = 0;
unused1 = readbin(unused1, sas, swapit);
unused2 = readbin(unused2, sas, swapit);
unused3 = readbin(unused3, sas, swapit);

// could not reproduce this locally
fml_out += "#REF!";
fml_out += "\n";

if (debug) Rcpp::Rcout << sas.tellg() << std::endl;

break;
}

case PtgAreaErr3d:
case PtgAreaErr3d2:
case PtgAreaErr3d3:
Expand Down
Loading