TIBCO BW 5 Read Excel file - excel

I would ask you if is there some way to read an excel file(.xls) using TIBCO BW 5.
Till now I'm made this in three different ways:
1: As convert excel file(.xls) to CSV file.
2: As .xls as an XML file
3: As custom Java code, that reads Excel files, using Apache library(Poi)
Unfortunately, there is no Excel plug-in for TIBCO BW 5. Or I cannot find it :(
Another way that I found, is that I could use Windows ODBC - everything is configured, but after I add the rt.jar file, still can not make a connection with TIBCO Designer.
Every time It throws this exception:
<>
Thank you in advance for your help.

On TIBCO BW 5.X projects the following solutions are commonly used:
1: Convert excel file(.xls) to CSV file.
3: Custom Java code, that reads Excel files, using Apache library(Poi)
In a BusinessWorks 6.X context you can use the EXCEL plugin that is using the apache POI library.

you need place that odbc jar in your Tibco_Home\tpcl\5.11\jdbc.
restart the designer.
Note:-if there is no jdbc folder create it

Unfortunately, there is no Excel plug-in for TIBCO BW 5. Or I cannot find it :(
It's there: https://docs.tibco.com/products/tibco-activematrix-businessworks-plug-in-for-microsoft-excel-6-1-1
Once you import the Excel plug-in into your project, you could simply use the "Excel Read" activity, passing the excel file you want to read. The plugin also provides you a lot of other excel-related functions.

Related

How to get OleDb for reading excel in asp.net core project

Is there any way of reading excel data in ASP.NET Core (built over .Net Core)? I am not able to refer OleDB in project.json of my .net core project. Is there any other way of doing this?
Do you really need OleDB to read Excel today? To my opinion, OleDB is a bit outdated. There are opensource libraries to work with Excel files which are much easier to use and provide a lot of flexibility.
ClosedXML (https://closedxml.codeplex.com/) is one such library. It's well documented and allows to both read and write Excel files with custom cell style formatting.
I have used OleDB for reading very large Excel files too, it works but there are certain issues with it, here are a few of them off the top of my head:
You will need to install MS ACE OLEDB provider which sometimes is hard to configure.
You will have to read Excel files in passes while with ClosedXML you can access rows/cells randomly by id/address.
OleDB uses a Windows registry configurable setting to check the number of rows (default is 8) to determine the data type for the whole column and sometimes there are issues with it because the data type is determined incorrectly. ClosedXML allows you to set a specific data type for any cell.
I'm not a ClosedXML developer, so this is not an ad. As I mentioned, I have used (and continue to use) both OleDB and ClosedXML in my projects. With OleDB I was able to read very large Excel files (400-800K+ of rows for example) either row by row or using SQL Server "SELECT * FROM OPENROWSET(...)". Also SQL Server can directly write to Excel files using same ACE provider and it worked for very large files too.
However, ClosedXML I have used for reading/writing relatively small files but they used a lot of custom formatting. So if you start a new project I would recommend going away from OleDB.
The only limitation of ClosedXML is that it support only zipped XML Excel files, i.e. Excel version 2007+. You can find many examples on the ClosedXML site mentioned above which would help you to get started.
Let me know if this was helpful. Thanks.
As indicated by andrews, it is recommended to use a third-party library, especially when working with formatting. An alternative to ClosedXML is EPPlus. For most of my project I have used ClosedXML, but I had to switch to EPPlus because it has support for charts.
For ASP.NET Core, you can use EPPlus.Core. I have performed a quick test within an ASP.NET Core 2.0 console app and it seems to work fine:
var newFile = new FileInfo("some file.xlsx");
using (ExcelPackage xlPackage = new ExcelPackage(newFile))
{
var ws = xlPackage.Workbook.Worksheets.Add("etc");
ws.Cells[1, 1].Value = "test";
// do work here
xlPackage.Save();
}

Oracle - best way to use XLSX data directly, not using Apache POI

In Oracle 12
Is there a quick way you can template how to import XLSX files into Oracle directly?
I can use say apache POI to load it to a temporary java transfer object that gets sent to turn into jdbc/Sql in some fancy way. But it's slow as heck.
There is Sql Developer where you can import CSV. And other tools for CSV.
But what about xlsx spreadsheets from Microsoft Excel? Is there something that can import sheets, columns, formats, etc.?
One method would be to convert your Excel file from an xls file to a csv file and then you can use an Oracle external table.

How to open spss data files in Excel?

I want to open spss .sav data files in Excel without opening the spss files (I don't want to convert spss data file into Excel file). I know this is possible using OLDB connection, but I don't know how to do this.
I converted sav to csv online: http://pspp.benpfaff.org/
(Not exactly an answer for you, since do you want avoid opening the files, but maybe this helps others).
I have been using the open source GNU PSPP package to convert the sav tile to csv. You can download the Windows version at least from SourceForge [1]. Once you have the software, you can convert sav file to csv with following command line:
pspp-convert <input.sav> <output.csv>
[1] http://sourceforge.net/projects/pspp4windows/files/?source=navbar
In order to download that driver you must have a license to SPSS. For those who do not, there is an open source tool that is very much like SPSS and will allow you to import SAV files and export them to CSV.
Here's the software
And here are the steps to export the data.
I help develop the Colectica for Excel addin, which opens SPSS and Stata data files in Excel. This does not require ODBC configuration; it reads the file and then inserts the data and metadata into your worksheet.
The addin is downloadable from
http://www.colectica.com/software/colecticaforexcel
You can do it via ODBC. The steps to do it:
Install IBM SPSS Statistics Data File Driver. Standalone Driver is enough.
Create DNS via ODBC manager.
Use the data importer in Excel via ODBC by selecting created DNS.
You can use online converter, developed by me at N'counter.
This is the easiest way to open SPSS file in Excel.
1) You just have to upload your file to SPSS coN'verter at https://secure.ncounter.de/SpssConverter
2) Select some options
3) And your converted Excel file will be downloaded
No information about your file contents is retained on our server. The file travels to our server, is converted in-memory, and is immediately discarded: We don't peer into your data at any time!
I tried the below and it worked well,
Install Dimensions Data Model and OLE DB Access
and follow the below steps in excel
Data->Get External Data ->From Other sources -> From Data Connection Wizard -> Other/Advanced-> SPSS MR DM-2 OLE DB Provider-> Metadata type as SPSS File(SAV)-> SPSS data file in Metadata Location->Finish

Cannot connect csv to Excel thru ODBC

HI;
I cannot connect a CSV file to a SpreadSheet when the file is open. Currently a have a csv log file that is being constantly updated. I was able to connect it a an Excel SpreadSheet by normal import from external source with refresh every hour. However, its a big file so I needed to produce the reports using EXCEL SQL. It will not allow me to connect to the file while it is open. It says that the MS Jet database engine cannot open the file'unknown'. It is already opened exclusively by another user or i need permission to view its data. If granting permission is he problem , where do I grant myself permission. On a standard Impor, I have no problems reading the file while it is open, but otherwise, get this message and cannot proce3ed. Any help would be appreciated. If I close the update program, I am able to run the queries, but not if the update is running.
Using MSO 2007 W7 x64
It will not allow me to connect to the file while it is open.
That's right, it won't - there is no way to change this.
You must find another way to solve your problem.
How big is the file? You may be able to make a copy to a temporary filename, and connect Excel to that instead.
It sounds like you are accessing a logfile. LogParser can read CSV. In any case LogParser has an excellent SQL-like syntax and can read CSV files much more quickly and reliably than ODBC. It is also programmable from Excel VBA (or script). Perhaps you can use LogParser to extract the values of interest and then load those into your Excel table instead.
I suspect your best solution will be to use the LogParser MSUtil.LogQuery object from Excel VBA, to extract the values of interest into your spreadsheet. Since I don't know what you are actually doing this is just a guess!
I cannot recommend LogParser highly enough - it is a wonderful tool, and can read just about every standard type of logfile, CSV, TSV, W3C, as well as plain text files and the windows NT event logs:
LogParser 2.2 Download: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en

Convert docx to xlsx

I am writting .NET application that generates reports in docx. One of the last requirements I've got was - generate also these reports in xlsx format. So,
is there any simple way to convert docx to xlsx format? I haven't found any solution or utility/library. One of the ideas was to use Microsoft.Office.Interop Copy/Paste methods, but I don't know if it helps :)
We have used a MS tool that allows you to work with Office documents as if they were xml:
Open XML SDK 2.0 for Microsoft Office
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en
This had the following benefits compared with interop:
No need in install office
No problems with memory due to Excel not closing
Better performance, in our case it went from 40 seconds to 2 (two)

Resources