I will export my html table to pdf , excel and print
I found this tuto , I try it but not work
I think I missing something
I need help
[tuto link ] https://datatables.net/extensions/buttons/examples/initialisation/export.html
Here is working fiddle
http://jsfiddle.net/3F8ZJ/
Make sure you check the versions.
Make sure to load this CDN's
http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css
http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js
http://cdn.datatables.net/tabletools/2.2.2/css/dataTables.tableTools.min.css
http://cdn.datatables.net/tabletools/2.2.2/js/dataTables.tableTools.min.js
You might study programming skills and make a code.
As an easier way, I introduce an online extracting tool, http://listly.io/.
Copy and Paste your html code, then it extracts the list-like contents.
You can also download Excel file.
Table Tools, that you are using, has now been retired and has been replaced by the Buttons and Select extensions.I wouldn't recommend using it.
Also, try using HTML buttons instead of SWF, unless you have to.
I made some changes to your code, and it is working well. You can see it here!
Note that, i have changed external resources
Also i would recommend using local resources instead of linking to it.
Related
I already use Laravel 8 with Yajra DataTable et wanted to test Infyom Laravel-Generator that seems to be a great package.
I created my first test app and generated a Yajra DataTable.
I see the datatable page, I was able to create a first record, the table in the database is updated, but the page shows always no record even if I refresh it.
And there is no Search input on the page.
I see nothing in the Laravel logs.
When I open my browser (firefox) in dev mode, I see no XHR request that seems to be abnormal since I see such a request on a website with datatable build without Infyom package.
Having a look in the source of the html page, no datable script is present!
So the pb should come from the genaration script, I used this cde :
php artisan infyom:scaffold Es5 --fromTable --tableName=es5 --datatables=true
I'll appreciate any help to debug/explai this.
Thanks in advance.
PS : Let me know if you want me to share some code, but now I don't know which part should be useful.
this could happen if the number of columns you defined inside your HTML table is not equal to the number of fields you are trying to fill inside your javascript code.
How did you implement it?
Did you use service implementation? I suggest to handle it in this way
I forgot to publish datatable add_on html & buttons
and found the solution here
https://github.com/InfyOmLabs/laravel-generator/issues/84
If you are using the adminlte-generator scaffold, there is an issue with the javascript is not being imported. Here is the solution:
https://github.com/InfyOmLabs/adminlte-generator/issues/87
Find #yield('third_party_scripts') in views/layouts/app and change it to #stack('third_party_scripts').
I had put my 2 days on that but the answer was so simple. make sure the yajra/datatable JS script is loading while you trying to render table
Simply change in your layout/app.blade.php
from
#yield('third_party_scripts')
to
#stack('third_party_scripts')
Intro
Hi, I was looking for answer in the whole Internet (in some way I kind of feel that I know every question in Stack Overflow), but the answers were never appropriate to what I'm looking for. I was trying to avoid posting question here, but situation forced me to do this.
Sorry if the answer is simpler than I think.
I'm in the middle of building my first app in Electron using JavaScript. I think that I should describe it in few words, so flam:ngo™ (which is projects name) should work like this:
User will upload two files:
file with tables (like XLSX or DOC)
file with data and blank spaces (which will be used as a template)
App will import from tables.
Now app should let user choose which rows he's interested in and where in uploaded file he wants them to be placed.
flam:ngo save document in PDF (or DOC).
Clue
Right now I need solutions just for myself and in little simpler form. For now I need flam:ngo just to work with one specify XLSX and with one DOC template, but I stuck. I know which rows in document I will always need, but I don't know what should I write to specify in JS's code that I need exactly this ones (like hey, app, pick only this one, this one and maybe this one) while JS is reading file and I don't know how to create new DOC (or PDF) file, how to write data in specified blank spaces and then at the end: how to save it in direction which I should choose for every time I'm using an app - everything in one, maybe two, processes.
Ending
Could you, please, help me: for now I have implemented file uploader which is importing file in XLSX and which is saving it as CSV, XML oraz HTML. What should I do to keep moving forward?
I really appreciate your help!
PS. For better explanation:
For now this should look like this:
1. "template.docx" is uploaded in the core
2. user uploads .xlsx
3. app reads tables and select rows chosen in code
4. app puts data from chosen rows in specify places
5. app saves file > new life of the app :)
Ok, so it's been a while and app has been already written by me. Maybe this will help someone in the future:
Solution
Packages that helps me with this issue was:
js-xlsx which converts my file to simple HTML file, where cells from my XLSX template file have always the same ID (which was important for me to work with document templates).
officegen which helps me write brand new document based on earlier prepared template.
Rest of it was just Vanilla JS.
I'm using Notepad++ to do Javascript, and it doesn't work. This is what comes out in the web page:
, not the actual thing it would display when it runs properly.
I have the notepad++ 6.6.7 version.
Here's how I did it:
Write the code.
Change the language to Javascript.
Run it in Google Chrome.
And this is my result!?!?:
Am I not using Notepad++ correctly or my code has an error in it? Thank you so much!
Rename your file to somefilename.html.
You're saving your file as thing.txt. Save it as thing.html.
Also you're saying that you are working on javascript, but your code only contains html, so even you try to choose the language as javascript, javascript format won't work (but first save it as html file).
Browsers will render HTML and execute JavaScript in HTML documents not text documents as your filename of thing.txt suggests.
If you're experimenting try one of these sites: http://jsbin.com/ or http://jsfiddle.net/
I want generate a development tool that I can input code (Such as HTML, CSS and JS) and it will create a preview/result window (like JSFiddle). I will be using it for tutorials in school and need a unique site to do this from (I would love to use CodePen, JS Fiddle or Codecademy... But I can't).
I am able to generate a form that can be processed and shown in an iframe (through PHP where it simply echos the information into a new html file that is shown in the iframe). But this came with problems; I only have a cheap server and won't want to put too much pressure on it so need todo this through JS/jQuery.
Firstly is this possible? And how would I go about doing it (code examples would be great!)?
Thanks in advance (I appologise if I haven't given enough detail but I'm fairly new to this and may just be asking a pointless question (I'm only 15 :/ ) )
Cheers :)
There is a rather impressive project called php.js that will let you parse and execute a subset of PHP code in the browser.
If you want to do it complete on a client/ in browser like jsfiddel do, then you need 2 or more frames.
One is for your code and one is for the output.
If you click on "run", then need to apply your code to the frame. You can do this by accessing the document object of the frame. If you got it, you´ll need to inject your code there. There many examples in the web on how to access a child document object from an frame/iframe.
how to export a html page content to ms word {javascript, ajax, jquery code}
Whats wrong with simply saving it as a .doc instead of .html
I understand this might be a bit limited. But you might need to provide some more info.
I wrote a little Adobe air application that needed to create word documents to be printed by merging a template with some data. Instead of figuring out the Word API, I just use HTML templating and saved the resulting HTML locally as a .doc (as Russel Dias points out) and Word opens it without a problem. Client is still happily using it.