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

javascript to export table data as .xls file #83

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

vinay-easwaran
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@mrysav mrysav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like what you have so far and I thought your demos this morning went really well! Thank you for the progress so far!

Comment on lines +56 to +57
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="//cdn.rawgit.com/rainabba/jquery-table2excel/1.1.0/dist/jquery.table2excel.min.js"></script>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend downloading these to the BLIS folder and putting them somewhere so they can be accessed locally. There is a bunch of javascript already in htdocs/js for this reason.

Additionally - using these libraries is fine, but please test on the ancient bundled version of Firefox (5.x I think?) with the BLIS Windows version to make sure the libraries and your code works there as well.

Comment on lines 3 to 8
# TAKE NOTE!
# For this to work properly, you need to make sure that _all_ of these
# required files are not outputting anything to the browser.
# https://github.com/PHPOffice/PHPExcel/blob/1.8/Documentation/markdown/Overview/08-Recipes.md#http-headers
# Ensure that these files are _not_ encoded as "UTF-8 with BOM" (Byte Order Mark)
# since that also counts. They should be "UTF-8".
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comments for this file, as above.

Comment on lines 807 to 812
// $query = "(SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'patient') UNION
// SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'specimen') UNION
// (SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'specimen_type');";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// $query = "(SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'patient') UNION
// SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'specimen') UNION
// (SELECT CONCAT(table_name, ':', column_name) as field_name FROM
// Information_schema.columns where table_name = 'specimen_type');";

Better to not commit commented code


$("#report_content_table5").table2excel({
// exclude: ".excludeThisClass",
name: "Daily Log - Patients",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can probably replace this with a localized string from somewhere

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

Successfully merging this pull request may close these issues.

2 participants