Solved

Getting the user created file through dw.saveas()

Posted on 2008-06-10
3
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
diasroshan earned 50 total points
ID: 21897206
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
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.

730 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