in my script I'm using perl module Net::Google::Drive::Simple. I can see/download all my imported/shared files on my Google Drive, but I can't see/download any spreadsheets which I created/are shared with me.
Am I using bad module for this or are there any special methods for handling spreadsheets?
Thank you in advance.
Only documents like PDF or png can be downloaded directly. Google Drive Documents like spreadsheets or (text) documents need to be exported into one of the available formats. Check for "exportLinks" on a file given.
Source
Related
I would like to convert this book Mastering the Lightning Network, which is freely available through GitHub to a pdf for personal use.
Unfortunately, I have only figured out how to "translate" single files using asciidoc or asciidoctor-pdf. The options for folders don't seem to work with the configuration of the repository.
There has to be an easy way to translate everything, including all files and pictures. Would be very thankful if somebody could help me out.
As far as I know it is not possible to convert a folder containing AsciiDoc files to a pdf, a simple script could do it but the problem would be in what order do you want your files to be converted?
The simplest solution for you is to create your own content.adoc file and use the include macro to select what files you want to convert and in what order, it could look something like this:
= Mastering the Lightning Network
include::01_introduction.asciidoc[]
include::02_getting_started.asciidoc[]
include::03_how_ln_works.asciidoc[]
include::04_node_client.asciidoc[]
include::05_node_operations.asciidoc[]
include::06_lightning_architecture.asciidoc[]
include::07_payment_channels.asciidoc[]
include::08_routing_htlcs.asciidoc[]
include::09_channel_operation.asciidoc[]
include::10_onion_routing.asciidoc[]
include::11_gossip_channel_graph.asciidoc[]
include::12_path_finding.asciidoc[]
include::13_wire_protocol.asciidoc[]
include::14_encrypted_transport.asciidoc[]
include::15_payment_requests.asciidoc[]
include::16_security_privacy_ln.asciidoc[]
include::17_conclusion.asciidoc[]
and you convert using asciidoctor-pdf content.adoc
You could try using imagemagick:
magick *.jpg out.pdf
I have an input .xlsm file from which I have to parse some values.
Currently I am using Win32::OLE which from certain reasons I need to stop using.
Is there a way to parse that file without using EXCEL processes?My searches on google lead me to Spreadsheet::ParseXLSX module and Excel::Writer::XLSX(with some problemes), but I don't know whether they require Excel or not.
Thank you!
I am trying to write a script that will allow me to download numerous (1000s) of data files from a data server (e.g, http://hydro1.sci.gsfc.nasa.gov/thredds/catalog/GLDAS_NOAH10SUBP_3H/2011/345/). Unfortunately, the names of the files in each directory are not formatted in a similar way (the time that they were created were appended to the end of the file name). I need to be able to specify the file name to subset the data (I have a special tool for these data types) and download it. I cannot find a function in matlab that will extract the file names.
I have looked at URLREAD, but it downloads everything including html code.
Thanks for your help!
You can easily parse the link.
x=urlread(url)
links=regexp(x,'<a href=''([^>]+)''>','tokens')
Reads every link, you have to filter all unwanted links.
For example this gets all grb files:
a=regexp(x,'<a href=''([^>]+.grb)''>','tokens')
Can I read an excel file without using any module?
I tried like just reading a normal file and it printed binary characters; maybe because of encoding?
But reading csv files is working normally.
Excel files are binary files, and the format of the pre-2007 ones is apparently quite hairy. I believe .xlsx files are actually zipped XML, so unzipping them should yield something human-readable, but I've never tried it. Why do you want to not use a module though?
Some further reading, if you're interested:
http://joelonsoftware.com/items/2008/02/19.html
http://en.wikipedia.org/wiki/Office_Open_XML_file_formats
Can I read an excel file without using any module?
In theory yes. In practice no.
An Excel XLS file is a binary file within a binary file. The first step would be to parse the Excel BIFF data out of the OLE COM document container. This data isn't necessarily in sequential order.
Then you have to parse the Excel BIFF data, allowing for differences between versions, a shared string table with different encodings and CONTINUE blocks that map large data records in a parser unfriendly way.
The Excel XLSX format is a little easier since it is a collection of XML files in a Zip container. However, if you aren't using modules then even that would be a pain.
The Perl modules that deal with Excel files represent hundreds of man hours of work. Expect to invest a similar amount of work to avoid them.
And why can't you use modules?
You can try figuring out the format of what an Excel spreadsheet looks like, code for that, and then use that in your program. Maybe write it as a module and submit it to CPAN. Wait a second! There's already a module like that there!
The whole purpose of CPAN is to prevent you from having to reinvent the wheel. You need to read an Excel spreadsheet, and someone has done the hard work to figure out how to do this, and is giving it to you free of charge. A $40,000 value1, and it's yours for free! The CPAN system makes installing modules fairly simple. You run the cpan command. There's no real reason to avoid modules that can save you hundreds of hours of work.
And, what type of modules do you avoid? Is it all modules, or is it only modules that are not included in the standard distribution. I hate to think you don't use things like File::Copy or Data::Dumper just because they're modules even though they're included by default in most Perl distributions.
1 Imagine hiring a team to write code to convert an Excel file, so it can be read by a Perl program. They'd have to figure the ins and outs of the file format, code for all sorts of edge cases, and run it through all sorts of tests to make sure it really works. A rough estimate if we don't include things like charts, embedded content, and remote data access would be about 200 man-hours, but only because it's actually has been documented.
How to parse .chm files in perl ? Which module is used for it ?
How about Archive::Chm?
Performs some read-only operations on
HTML help (.chm) files. Range of
operations includes enumerating
contents, extracting contents and
getting information about one certain
part of the archive