Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » OfficeAutomation: how to get Excel Range
OfficeAutomation: how to get Excel Range [message #46785] Thu, 04 August 2016 17:16 Go to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
Is there a fundamental opportunity to add method for getting Excel Range instead of access to cells in a cycle GetValue(i, j)? Now access by GetValue when cells in the table ~100x100 very slow in the case when GetNumTabs ~ 1000

[Updated on: Thu, 04 August 2016 17:17]

Report message to a moderator

Re: OfficeAutomation: how to get Excel Range [message #46790 is a reply to message #46785] Mon, 08 August 2016 10:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello iST1

From now there are included in source, demo and documentation new fast functions to set a data matrix on an spreadsheet.
I am working in new functions to get data from an spreadsheet.
They are available only for MS Excel.


Best regards
Iñaki
Re: OfficeAutomation: how to get Excel Range [message #46791 is a reply to message #46790] Mon, 08 August 2016 15:52 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Sorry iST1

I am stuck... Code is apparently right but no data is kept from the spreadsheet and no error is got from Windows.

In Bazaar/OfficeAutomation_demo_console sample, line 100, sheet.MatrixGet() function should get spreadsheet data.

Any help is acknowledged Rolling Eyes


Best regards
Iñaki
Re: OfficeAutomation: how to get Excel Range [message #46792 is a reply to message #46791] Mon, 08 August 2016 17:36 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
In TheIDE v9251 i found a group of methods Matrix***, but still can not get the value
For example, i'm trying to get left 2x2 matrix:
			sheet.OpenSheet("C:/1.xls", true);	
			
			sheet.Select(1, 1, 2, 2);
			Vector<Vector<::Value> > data;
			data.SetCount(2);
			data[0].SetCount(2);
			data[1].SetCount(2);
			
			sheet.MatrixAllocate(2, 2);
			sheet.MatrixFill(2, 2, data);
			
			::Value &val = data[1][1];
			int d = val;
			sheet.MatrixFillSelection();
			d = val;
			sheet.MatrixFill(2, 2, data);
			d = val;
			sheet.Quit();

You can make a small example? (Matrix** is unused in Bazaar/OfficeAutomation_demo_console)
Re: OfficeAutomation: how to get Excel Range [message #46794 is a reply to message #46792] Tue, 09 August 2016 09:35 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello iST1

AFAIK those methods were created to set data in a spreadsheet, but not to get data from it.

In OfficeAutomation_demo_console sample you will see a new version of them.


Best regards
Iñaki
Re: OfficeAutomation: how to get Excel Range [message #46798 is a reply to message #46794] Tue, 09 August 2016 18:50 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
Hello koldo!
Unfortunately, I need to read range. Its implementation is not planned?
Re: OfficeAutomation: how to get Excel Range [message #46799 is a reply to message #46798] Thu, 11 August 2016 12:05 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
koldo wrote on Mon, 08 August 2016 15:52
Sorry iST1

I am stuck... Code is apparently right but no data is kept from the spreadsheet and no error is got from Windows.

In Bazaar/OfficeAutomation_demo_console sample, line 100, sheet.MatrixGet() function should get spreadsheet data.

Any help is acknowledged Rolling Eyes


Best regards
Iñaki
Re: OfficeAutomation: how to get Excel Range [message #46801 is a reply to message #46799] Thu, 11 August 2016 19:50 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
Are you sure that this feature is in the TheIDE v9251? Attached is a screen line 100
Re: OfficeAutomation: how to get Excel Range [message #46804 is a reply to message #46801] Fri, 12 August 2016 09:34 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Oh no! Smile. I added that few days ago, so it is in version > 10100

Best regards
Iñaki
Re: OfficeAutomation: how to get Excel Range [message #46806 is a reply to message #46804] Sat, 13 August 2016 19:25 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
I Found! But, for some reason the data is not filled, but on the contrary, after the call MatrixGet is cleared appropriate Range in Excel. At the same time data-vector is resised, but contain only empty Values

[Updated on: Sat, 13 August 2016 19:26]

Report message to a moderator

Re: OfficeAutomation: how to get Excel Range [message #46810 is a reply to message #46806] Mon, 15 August 2016 19:48 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
In Bazaar/OfficeAutomation_demo_console sample (> 10158), line 100, sheet.MatrixGet() only cleared Range without getting values
Re: OfficeAutomation: how to get Excel Range [message #46822 is a reply to message #46810] Sat, 20 August 2016 07:26 Go to previous messageGo to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
Hello Koldo! May I be wrong to look, but MatrixGet does not work(
Re: OfficeAutomation: how to get Excel Range [message #46823 is a reply to message #46822] Sat, 20 August 2016 16:57 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello iST1

I know it but I do not know how to solve it.


Best regards
Iñaki
Previous Topic: bazaar/FormExample compilation error
Next Topic: Functions4U: Added LocalProcess2 and RealTimeStop
Goto Forum:
  


Current Time: Thu Mar 28 14:39:11 CET 2024

Total time taken to generate the page: 0.01904 seconds