trying to get some hands-on with golang. Currently I have an issue which I can fix using java but not with go.
Here is the issue. I have to read an excel file, and just get a Area Reference for example cells (Sheet1!A1:F6) and not the entire sheet.
This can be easily achieved using Apache Poi, but all the api's that go has do not have a way to get a range of cells. The golang library I am using is https://godoc.org/github.com/tealeg/xlsx . I would really appreciate if anyone has done this kind of work. Unfortunately I dont have a working code for go since I don't know the function I have to call. Other than go over all the columns and then ensure just get the ones I need.
Related
I am trying to get VBA to access a SAS dataset for use in an excel spreadsheet, there appears to be a specific Method for doing this but I can't get it to work as it keeps giving me an error.
My code as it stands looks like
Sub GetData()
Dim sas as SASExcelAddIn
set sas=Application.COMAddIns.Item("SAS.ExcelAddIn").Object
Dim data as SASDataView
set data =sas.InsertDataFromSASFolder ("path", Sheet1.Range("A25"),25,True,"","",True)
End Sub
The value of Path is a unix path to the folder with the dataset in, I have tried specifying this both with the dataset and without and with the dataset without the file extension but I always get the error:
The only documentation I can find is https://documentation.sas.com/doc/en/amodg/8.3/p11y2jzgivsqw4n1ixw5jjf22obd.htm but it is not solving my issue.
My aim will be to automate this to allow the folder to be changed and the SAS datasets referenced to update to the new data with just a single input. Any ideas why this isn't working?
Thanks
The only thing I can think of, and I don't use VBA with SAS, is this statement: "The data source must be saved in the metadata" at the top. Let me propose an alternative if someone doesn't solve it. Consider using VSTO (C#), vs VBA, and read the SAS dataset using ODBC or OLEDB. Much, much simpler and easier to debug scenario. VSTO allows you to create anything in the ribbon and relies on interop to work with Excel.
Good luck on getting an answer. Consider an alternative if you hit the wall.
Here is the situation: I'm 'having fun' really using Microsoft Access for the first time for small personnal project/tools ideas.
I don't know anything about VBA yet, and unless I can't do without it, I don't plan to learn it this time (already a lot else to cover).
So I tried to use Python to automatize the main table filling. I did find pyodbc package and succeeded to connect, read and write some data out of my database.
However, I wanted to experiment a little further, and one of the fields could contain hyperlinks (could be handled somewhere else in another script later, but I am curious about the functionality anyway)...
But I couldn't figure how to insert hyperlink data in the table. I only get the displayed text set, but not the target one.
Is this feasible using pyodbc or am I on the wrong track?
Thanks in advance!
Emmanuel
The hyperlink field in MS Access consists of three parts, separated by #:
display text # filename or target # location within the document
So an example of the data of a field can look like this:
StackOverflow#http://www.stackoverflow.com#
See the docs: https://learn.microsoft.com/en-us/office/vba/api/access.application.hyperlinkpart
and samples here also: http://allenbrowne.com/casu-09.html
I'm currently working on a project (developed using laravel, php, javascript, jquery, html), containing a large amount of data, so I'm using DataTables to display them with serverside set to true. What I'm trying to figure out is how to export the complete table to an excel file - right now it only saves one page (the one being shown at that very moment ) - using the Button extention.
I've been reading about it for a while now but still can't figure out a way to do this. I understand that, since serverside is set to true,
the only rows that exist on the client-side are those shown in the table at any one time.
But how can I get the complete table? Any help would be appreciated!
UPDATE:
So I create the excel file with the data I want in the backend, using PHPExcel, but now the problem is that it is saved server-side, while I wanna make it downloadable (client-side). From what I've been reading, I must add the appropriate headers to do so, but nothing I've tried works. Using
this, I managed to output the data of the excel in the screen, but it just shows gibberish... I should probably also mention that I'm new at this!
It's my first question here so please be easy on me..
I'm trying to create an excel report from a dataset i've created in MS Access as part of a MS-Access based large project.
This project has to run on many machines and to avoid reference errors i use late-binding.
My problem is that when i try to create (from Access) a Timeline using the "Slicercaches.add2" method my code fires error "5". As a test i've created the timeline from Excel-vba and i found that if i use the "XlTimeline" constant it works, but if i use the "2" value not . Is there a way to use the Xltimeline constant inside Access-Vba without reference to excel libraries??
Thanx in advance
MF
First off, welcome to Stack Overflow. Without seeing your VBA code, answering your question would mostly be speculation. As a common practice, it is always beneficial to show the code you're working with (same concept as a picture is worth 1000 words). With that being said, working with Excel objects (or any other office application) requires that you import the necessary libraries. With the Excel library imported, you can essentially do anything to an excel file using the Excel object. Is there a particular reason you would like to refrain from using the Excel library?
Here is a link to a code that uses apache 3.7.
http://massapi.com/source/poi-3.7/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java.html
How can i edit this code to get the comments in excel file?
Comments are stored in a different stream (Document Part) to the sheet, so you'd need to navigate from the sheet to the comments (if present) and parse that
The relation will be of type XSSFRelation.SHEET_COMMENTS
As the comments part is normally fairly small, you should be fine to just access it using normal UserModel code. CommentsTable is the class that will give you easy access to it, pass that comments part and the relation from the sheet and work your way through the comments in turn
If you get it working, send a patch to POI so it gets included in future!