Solved

Getting the user created file through dw.saveas()

Posted on 2008-06-10
3
273 Views
Last Modified: 2013-12-26
1. I am exporting the data of a datawindow through dw.saveas(). I am not passing any filename to it, and hence the user has the flexibility to save it wherever desired and in whtaever name. How to get the path and filename of the resultant .xls file?
2. Even if I could lock the columns in the resultant .xls file, users can copy the contents to a new file. I want the copy menu item to be disabled, so that the contents can't be copied.
0
Comment
Question by:sisirpat
3 Comments
 
LVL 18

Accepted Solution

by:
diasroshan earned 50 total points
Comment Utility
Hi,

1) Try using the following API to get the current directory,
Declaration:
Function ulong GetCurrentDirectoryA (ulong textlen, ref string dirtext) library "KERNEL32.DLL" alias for "GetCurrentDirectoryA;Ansi" //alias for "GetCurrentDirectoryA;Ansi"

Code:
ulong         lul_size = 260       /* MAX_PATH */
ulong         lul_Rc
String          ls_currentDir
ls_currentDir = Space ( lul_size )
lul_rc = GetCurrentDirectoryA ( lul_size, ls_currentDir )


Cheers,
Rosh
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now