Excel Chart from Notes using LS?

I have searched the forums and gotten quite a lot of hits, but nothing that specifically answers this question.

I have a Vacation request DB. The form is LR SHORT. The form records all types of requests, and the leave type I need is SL (SICK LEAVE).

I need to take all SL requests by date, and export them into an Excel spreadsheet and create a chart by date.

The Fields on the form are ‘StartDate’ and ‘LeaveType’

I need the Excel format to be:

Date Type Count

08/12/2009 SL 3

08/13/2009 SL 12

Etc…

So if I do a column count in a view, it gives me

08/12/2009 3

        SL    1

        SL    1

        SL    1

If I just export the view, it won’t chart correctly.

Can someone please point me in the right direction to get the data in the correct format?

Once I get the basics down here, I can create other script to generate other reports (like, vacation, personal business, leave without pay, and such.)

Any help would be great. I have a solid drop dead date of 9/30, but need to demo it by late next week.

Thanks in advance!

Bruce

Lovin’ life in Oregon

Subject: Export to Excel

Okay, your start was not bad.Of course, create a view showing the SL requests only, categorized by date.

Insert a first column with 1 as formula and “total” in the sorting tab.

Create a NotesViewNavigator using the CreateViewNav method of the NotesView.

Move to the first ViewEntry using GetFirst.

Loop through the categories using GetNextCategory.

For each category, read the date using the NotesViewEntry.ColumnValues(1), and the number of requests using the NotesViewEntry.ColumnValues(0).

Export the values to Excel, you’re done !

Hope it helps.

Thierry Cayla

http://dominoeffects.serveblog.net

Subject: Export to Excel…

Thank you sir! I will get to work on the code. I appreciate the assistance.

Bruce