473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to read excel in reverse Order located on server??

Hi Friends

How to read excel worksheet on server in reverse direction??
May 23 '08 #1
8 1459
Curtis Rutland
3,256 Expert 2GB
Hi Friends

How to read excel worksheet on server in reverse direction??
Why not read it into an array or matrix in the correct order, and then read it from the array/matrix backwards?
May 23 '08 #2
Thanks for reply.

But my need is to read Excel file's Col A and Col B in reverse direction.
And main condition is that Excel file is located on server.Not on same machin where i run program.

Thanks & Regards
Question123
May 26 '08 #3
Hi
I want to read Excel file's Col A and Col B in reverse direction.
And main condition is that Excel file is located on server.

Plz help me.

Thanks & Regards
Question123
May 26 '08 #4
Curtis Rutland
3,256 Expert 2GB
Hi
I want to read Excel file's Col A and Col B in reverse direction.
And main condition is that Excel file is located on server.

Plz help me.

Thanks & Regards
Question123
Was there some reason that your first post asking the exact same question wasn't good enough?

As to your question, I suggest you google Microsoft.Office.Interop.Excel to learn how to read from Excel sheets. Then reading backwards is as simple as counting down in a loop instead of up.
May 26 '08 #5
Thanks for reply..

Hello

Excel on server containing daily data from 1984 to todays date. And if in my database i have data updated already just last 2-3 days data was not there as compaired to excel.
So i want to know used row count (i.e. rows having data) of Col A and Col B so i can read data from that end.(i.e. Reverse upto last 2-3 days ) and skip all other excel reading.

i am try to get that with this code


************************************************** ******************************************

ApplicationClass xlApp = new ApplicationClass();

Workbook xlWBook = xlApp.Workbooks.Open(sFileName, 0, false, 5, "", "", false,
Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);

Excel.Sheets xlSheets = xlWBook.Sheets;

foreach (Worksheet xlWSheet in xlSheets)
{
Int64 Max = Convert.ToInt64(xlWSheet.UsedRange.Count.ToString( ));

Max = Convert.ToInt64(xlWSheet.Rows.Count.ToString());
}

************************************************** ******************************************

But it not giving me UsedRange of perticular column so how should i get that.
Plz help me.

(I dont want to use loop to find UsedRange of Column bcz it will be equal to reading excel from 1984 to todays date)

Thanks & Regards
Question123
May 27 '08 #6
Plater
7,872 Expert 4TB
Threads merged.
Please do not continue to post duplicate questions, it's against the posting guidelines.
MODERATOR
May 27 '08 #7
Hello

Excel on server containing daily data from 1984 to todays date. And if in my database i have data updated already. just last 2-3 days data was not there as compaired to excel.
So i want to know used row count (i.e. rows having data) of Col A and Col B so i can read data from that end.(i.e. Reverse upto last 2-3 days ) and skip all other excel reading.

i am try to get that with this code


************************************************** ******************************************

ApplicationClass xlApp = new ApplicationClass();

Workbook xlWBook = xlApp.Workbooks.Open(sFileName, 0, false, 5, "", "", false,
Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);

Excel.Sheets xlSheets = xlWBook.Sheets;

foreach (Worksheet xlWSheet in xlSheets)
{
Int64 Max = Convert.ToInt64(xlWSheet.UsedRange.Count.ToString( ));

Max = Convert.ToInt64(xlWSheet.Rows.Count.ToString());
}

************************************************** ******************************************

But it not giving me UsedRange of perticular column so how should i get that.
Plz help me.

(I dont want to use loop to find UsedRange of Column bcz it will be equal to reading excel from 1984 to todays date)

Thanks & Regards
Question123
May 27 '08 #8
Plater
7,872 Expert 4TB
Threads merged again.

Do NOT continue to double post your questions. This grinds my patience, something I have little enough of to begin with. There are posting guidelines for a reason.


MODERATOR
May 27 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: James Baker | last post by:
Here's my situation. I need on-site manager's to be able to view a list of records on our website (which they already can do). They need to be able to select any/all fields and then export...
1
by: matthew kramer | last post by:
Hi, I'm using the reverse pivot technique on an excel spreadsheet to create a list dataset from which I can make a pivot table in excell. The only problem is that because there are so many...
3
by: Isi Robayna | last post by:
Hello, I am trying to communicate with a legacy socket server. The first thing this legacy server does upon getting a client connection is to send an ID back to the client... I am trying to read...
2
by: Brent Bortnick | last post by:
Hello, Is it possible to send data from ASP and put it into a existing template? i don't want to create an excel document I only want to send one piece of information from ASP to the Exisiting...
7
by: Vanessa | last post by:
hi Everyone, I have two questions on exporting data to Excel using ASP (w/o converting formatted excel file into web page and then plug in the dynamic data): 1. Can we export data into...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
3
by: rlntemp-gng | last post by:
RE: Access 2003/Excel 2003 Problem: After I close the Access application completely, I go out to the Task Manager and there is an Excel.exe object still sitting out there. My Access...
3
by: =?Utf-8?B?UGV0ZXIgSiwgU2Nhbmlh?= | last post by:
Hello I'm looking for an solution about how to retrive data from an client side located Excel document by using an ASP.Net application. I don't want to upload the file to the server. I just want...
6
by: Dan Fergus | last post by:
Let's try both ASp and Excel groups and see if I can get some help... My web site loads an Excel template, populates it and redirects the user to the new file. This works great on my dev box. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.