Python:Excel unreadable content in file - python-2.7

When I try to download excel by web from python xlsxwriter. It given me the message
Excel found unreadable content in file. Do you want to recover the
contents of this workbook?
when I opened the file excel which i download. Please help me to solve it. Thanks

Related

SAS Enterprise Guide - How can I download a ZIP file from a website, extract its contents and run it?

I would like to have a task to download a continuously updated .ZIP data file from a specific website, extract its contents and run the file inside.
I am looking for a program code that performs these tasks and, so to speak, if the data on the website is updated, then my data file is also updated with it.
How can I do it?
Please help!
SAS Enterprise Guide 8.2
I didn't find a solution for it.
Read Chris method here for reading a zip file using filename statement: https://blogs.sas.com/content/sasdummy/2014/01/29/using-filename-zip/
Chris is the community director at SAS (something like that). A zip file will be locked on an update. Check the file date and store the date somewhere so you can see if it changed.
There are lots of ways to approach your problem and I dont know your constraints. Start with Chris' post and work from there.
You could download the zip using proc http
This macro will let you unzip it: https://core.sasjs.io/mp__unzip_8sas.html
And this macro will give you the recursive directory contents: https://core.sasjs.io/mp__tree_8sas.html

I accidentally saved an rmarkdown file as .html, is there a way back?

As the question says, I had opened a new .Rmd file and did all my work in it without saving it. Then when I wanted to knit it to HTML, RStudio prompted me to first save the rmarkdown file. I didn't fully realize and saved it with .HTML as extension instead of .Rmd. Now the file is all screwed up and I cannot find a way back.
Does anyone have a solution for this to recover my work or will I have to do it over again?

how to convert pdf file to Excel file using Django

I am trying to convert pdf file to Excel using Django, please anyone can help me how to convert pdf to excel in format way. I am trying, but the format does not work properly and also how to creating a download link for excel file.
It is possible to convert pdf to xlxs file in format way in Django ..?
please help how to do.
Django is a web framework, so i suppose your question was that how you can do that in Python. You can use this python library to convert the pdf to excel or CSV
https://pdftables.com/blog/pdf-to-excel-with-python

How do I edit files in Stata?

I'm using Stata 11 on OSX, new to Stata. Someone has sent me a .do file and I want to amend it and run it.
If I open the file in Stata (using File > Open), I see the file appear like this:
I can click on text, but I don't seem to be able to edit or select it. It's almost like an image rather than a text file.
So, um, how do I edit the text?
All of my Googling suggests I need to use the "do-file editor" - I'm not sure if this is it, and if so, how I set it to edit mode!
Open a new .do file (ctrl+9). Then in that go file>open and open the .do file in the editor. That should do the trick.

Difference in file size of an Excel file when downloading directly as opposed to open and saving it

May be the title of my question is really awful but I couldn't figure a better way to frame it. So the problem is I have a Silverlight web app that does some processing and generates an Excel file as output. THe Excel generation code uses OpenXML format to create various XML parts and packages and using System.Packaging.CompressionOptions I compress the file generated. Now, when the browser (IE 9) shows a download options box, if I click Open to open the file in Excel and then do a SaveAs, it saves the file with a further reduced size as opposed to if I hit Save directly on the download box in which case it saves it with whatever size the file was created with.
Any ideas why these 2 ways of saving the same file result in different sizes?
Cheers
Depending on how you used the OpenXML library, there might be some inefficiencies or errors. Resaving the file in Excel will fix any duplicate formatting, update the metadata (possibly reducing it) and fix any validation errors. I encourage getting the Open XML SDK 2.0 Productivity Tool provided with the OpenXML SDK to check for any validation errors and to better understand where more inefficiencies might lie. It is possible to automatically resave the file using Excel by using Interop (using C# anyways).