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

Please add this xls-test #349

Closed
msageryd opened this issue Apr 9, 2020 · 3 comments
Closed

Please add this xls-test #349

msageryd opened this issue Apr 9, 2020 · 3 comments

Comments

@msageryd
Copy link

msageryd commented Apr 9, 2020

I commented in another issue #348 and just realised that it was closed. I'll repeat myself in a new issue.

I'm migrating to this library from my old home cooked file checking lib. I had a check for old xls files. Was it flawed? Otherwise, please integrate this test into your lib.

//Old XLS files
function isExcel(buf) {
  if (!buf || buf.length < 520) {
    return false;
  }

  return (
    buf[512] === 0x09 &&
    buf[513] === 0x08 &&
    buf[514] === 0x10 &&
    buf[515] === 0x00 &&
    buf[516] === 0x00 &&
    buf[517] === 0x06 &&
    buf[518] === 0x05 &&
    buf[519] === 0x00
  );
}
@sindresorhus
Copy link
Owner

I already commented in #348 that we don't have any interest in supporting .xls.

@sindresorhus
Copy link
Owner

#340 would will let you add the check yourself.

@msageryd
Copy link
Author

msageryd commented Apr 9, 2020

Ok, sorry. I interpreted you comment as "too difficult to parse", hence my attached code. Thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants