Creating an html formatted file to be opened by Excel - html

I am trying to export a spreadsheet file from a website. The data is a bit too complex for a simple csv, so I figured the best way to do it was to format it into a file containing nothing but an HTML table. If I give it a .xls extension, it will open, but only after throwing an error and asking for confirmation. Is there a way to set up the file so that Excel knows that it is supposed to have HTML code in it, and so that the OS knows that Excel is supposed to open it?
This is going to be used by people who aren't going think to open Excel and drag the file in or open it from inside Excel. They're going to be double-clicking on the file.

Related

How to open a database file with no file type in SSMS?

I have a database file with no file type, I need to open it in SSMS first. When I try to open it, it says no editor for it. I tried to open it in a text editor by changing its name with a txt extension, it displayed unreadable code on the whole page. I have searched online it seems the only way is to change the file name with an extension. Is there any way to make SSMS recognize the generic extension file? Thanks
Larnu corrected me to use "Restore" instead of "Open". Thanks
New to database, need to learn everything.

How to display Excel file in an asp page choosing range

I am really new to asp.net I have found many hints about how to download and open in excel an excel page but what I'd like is to show the excel file in the asp page choosing the range to be shown. Is that possible?
something like this:
By doing so I'd make this file available to be seen to everyone even people not having excel.
thank you in advance
You may use this library
or convert the Excel file to a pdf and easily display it

Merge multiple access reports to one pdf file using vba

I wan't to merge multiple access reports to one pdf file using vba code. This vba code needs to work on the computers at my work. These computers only contain Adobe Reader, and I am not able to install Acrobat because I am not Administrator. So now my code generates for all the reports a seperate pdf. I had some code to merge these pdf files to one pdf file where I use 'Acrobat.CAcroApp'. But i get an error on line:
Set AcroApp = CreateObject("AcroExch.App")
I think I am not able to do this cause the computers only have Adobe Reader installed. Is there a possibility to create one pdf file for multiple reports/pdfs without using Acrobat.
Thx in advance
2 solutions.
Make a master report that has each individual report embedded as a sub report. If it's just a few, it should work fine, but too many may bog down / crash the application.
Here's a VBA way of doing it here.
Without acrobat reader this is indeed not going to work. I, however, am using the following dirty workaround for users without acrobat;
Export all your reports to rich text ("*.RTF" format) in the same folder. Afterwards, you open a word application via access vba, and loop through the RTF files and then copy them into your word file, with a page break after every insert. Then, you save the word document as a .PDF file.
This is a method prone to errors, so if a more experienced user has a better way, please do tell. I'm interested as well!

Creating a CSV file with the Report Generation Toolkit in Labview

I want to create .csv files with the Report Generation Toolkit in Labview.
They must actually be .csv files which can be opened with Notepad or something similar.
Creating a .csv is not that hard, it's just a matter of adding the extension to the file name that's going to be created.
If I create a .csv file this way it opens nicely in excel just the way it should, but if I open it in Notepad it shows all kind of characters and it doesn't even come close to the data I wrote to the file.
I create the files with the Labview code below:
Link to image (can't post image yet because I've got to few points)
I know .csv files can be created with the Write to Spreadsheet VI but I would like to use the Report Generation Toolkit because it's pretty easy to add columns and rows to the file and that is something I really need.
you can use the Robust CSV package on the lavag.org forum to read and write 2D arrays to CSV files.
http://lavag.org/files/file/239-robust-csv/
Calling a file "csv" does not make it a CSV file. I never used the toolkit to generate an Excel file, but I'm assuming it creates an XLS or XLSX file, regardless of what extension you give it, which is why you're seeing gibberish (probably XLS, since it's been around for a while and I believe XLSX is XML, not binary).
I'm not sure what your problem is with the write spreadsheet VI. It has an append input, so I assume you can use that to at least add rows directly to a file, although I can't say I ever tried it. I would prefer handling all the data in memory explicitly, where you can easily use the array functions to add rows or columns to the array and then overwrite the entire file.

How to paste tabular data into an HTML table

I have an HTML table on a webpage and can edit the contents manually. However, it would make my life much easier if I can copy the data from a file to the clipboard and just paste in onto the form. Can BHOs in IE do this? Any pointers will be helpful.
I have a superset of the data in a file and I don't want to type it all into the webpage.
If your file can be saved as a CSV (using Excel or some other program), then you can use a tool such as the one here (or write your own) to convert it to HTML.