I have a csv format report "A" and an excel file "B" contains two macro, the first macro will convert the csv report to a xls file "C", after that I want to copy the second macro in "B" to "C", so that I could open "C" and load the macro directly in the future. My question is how can I copy macro from "B" to "C", I'd appreciate any help you provide.
lonely_life
Posts
-
copy macro into xls file -
is there a memory limitation for MFC programs?the following is part of code from Nero SDK (NeroCmd), which recursively generate a ISO tree for buring, the main concept is finding all subfolder & folders of passed in directory "psFilename", this code works fine under console mode, but when I tried to put it to my MFC project my program always auto close due to it, but sometimes my code could get through without any modification, anybody knows what is going on here? is that because there's a memory limitation for MFC dialog application, due to the recursion here. CExitCode CBurnContext::CreateIsoTree (const PARAMETERS & params, LPCSTR psFilename, NERO_ISO_ITEM ** ppItem, int iLevel) { // CFindFiles is a helper class for file and subdirectory handling CFindFiles ff (psFilename); *ppItem = NULL; if (!ff.IsValidEntry()) { if (0 == iLevel) { // If we haven't found any entries and we are on the // first level of recursion then this should be // reported as an error. m_ErrorLog.printf ("File specification '%s' resulted in no matches!\n", psFilename); return EXITCODE_FILE_NOT_FOUND; } else { // If we are on a level other than first, it is ok // not to find any entries. This simply means we // stumbled upon an empty directory somewhere in a tree. return EXITCODE_OK; } } char sPath[MAX_PATH]; // Make sure that we have no relative path names, but only absolute paths if (NULL == _fullpath (sPath, psFilename, sizeof (sPath))) { // Our path buffer is too small. Bail out! return EXITCODE_INTERNAL_ERROR; } // Find the last blackslash and remove it if found. // This will leave us with a root directory. LPSTR psBackslash = strrchr (sPath, '\\'); if (NULL != psBackslash) { *psBackslash = '\0'; } do { std::string sNewPath; sNewPath = sPath; sNewPath += "\\"; sNewPath += ff.GetName (); if (ff.IsSubDir()) { // Here we handle subdirectories // strcmp returns 0 on equal strings. // Proceed if name contains none of "." or ".." if ((0 != strcmp (ff.GetName (), ".")) && (0 != strcmp (ff.GetName (), ".."))) { // Append a wildcard to the path and do a recursive search. sNewPath += "\\"; sNewPath += ff.GetWildcard (); NERO_ISO_ITEM * pNewItem = NeroCreateIsoItem (); if (NULL == pNewItem) { DeleteIsoItemTree (*ppItem); return EXITCODE_OUT_OF_MEMORY; } // Attach this item to the beginning of the list. if (*ppItem != NULL) { pNewItem->nextIte
-
Startup computer automaticallypersonally, I think you need a external device & program to control the power supply of shut down pc.
-
How to be unable to select item(s) in menu when right-clicked.EnableWindow(FALSE)
-
Video Editing of .avi & .mpegs filesif your editing only does cutting & pasting of frames, you could try directx sdk from microsoft, by using dx sdk you can snapshot frames from video stream, after that any image editor will help you with graph editing.
-
How to hide program on executionI am not sure whether this is what u want http://www.codeproject.com/system/xyntservice.asp
-
anybody has experience of using Nero SDK?I wana to write a application using MFC & Nero sdk, this application will just simply burn selected folder into CD/DVD-rom, but after I read though the sdk manual and play around a sample application called NeroFiddles comes with sdk, but it can only burn files. How can I burn directories? any ideas everybody? sample code will be appreciated.
-
size of folder?how could I measure size of a folder(including sub-folders and files) from code? tried CFileStatus.m_size, but it seems that MFC doesnt look at a folder as a kind of file. All comments are welcomed, especially with sample code :)
-
directshow play mpeg2 fileIMediaSeeking *pMS = NULL; ... init pMS; ... pMS->SetRate(2); when I try to change the playback rates using this function, it fails when playing a mpeg2 file (fine with an uncompressed avi file), there wont be any change in play rate, is that due to the decoder I am using? the decoder I use is stinky mpeg2 decoder. Anybody knows why?
-
textbox auto returnhow to let text box auto return when I reach right side edge of it? in another word, there's a limitation of characters in line.
-
how could I disable Escape the dialogyes, this is what I want, thanks
-
how could I disable Escape the dialoghmmm, if I overwrite OnCancel function, Esc key terminating the application is disabled, but I also can't terminate the application by click the top right cross button. What I want is just disable the key meanwhile the cross button still works.
-
how could I disable Escape the dialoghow could I disable the function when I click escape, dialog auto close. just like overwrite OnOk() function? but it seems there's no OnEscape()
-
//Need help in Directshow programmingHi Chris, I can't find this graphics card in GraphEdit's Video Capture Sources, but there is a MVR-D2000 Series kernel mode driver(WDM) under sound video and game controllers in Device Manager, how could this be?
-
CTime cause Assertion FailedI declear a CTime valiable and set it's value before 1970-1-1, it will cause a assertion failed error(timecore.cpp), I realized that 1970-1-1 is the defaule value for CTime, anybody encounter this problem before? please help me out, thanks a lot.
-
Date Time Picker Problem(IDC_DATETIMEPICKER)hi David, I tried your soluation, but the problem is still there, can you provide another simple sample? thanks
-
Date Time Picker Problem(IDC_DATETIMEPICKER)is there any method to resolve this problem? coz in my case I can't restrict input time to be after 1-1-1970
-
Date Time Picker Problem(IDC_DATETIMEPICKER)line 40 of timecore.cpp is ASSERT(m_time != -1); // indicates an illegal input time inside this constructor CTime::CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST) { struct tm atm; atm.tm_sec = nSec; atm.tm_min = nMin; atm.tm_hour = nHour; ASSERT(nDay >= 1 && nDay <= 31); atm.tm_mday = nDay; ASSERT(nMonth >= 1 && nMonth <= 12); atm.tm_mon = nMonth - 1; // tm_mon is 0 based ASSERT(nYear >= 1900); atm.tm_year = nYear - 1900; // tm_year is 1900 based atm.tm_isdst = nDST; m_time = mktime(&atm); ASSERT(m_time != -1); // indicates an illegal input time }
-
Date Time Picker Problem(IDC_DATETIMEPICKER)I use VC++ 6.0 to make a MFC dialog based project, simply add a Date Timer Picker, using classwizard add two member variables for this datetimerpicker control(CTime, CDateTimeCtrl), then compile and run this simple application, ok, then interface comes out, datetimepicker is initialized to be 1970-1-1, when I reset time to be any time before 1970-1-1 I get this error message: Debug Assertion Failed Program: C:\test\debug\test.exe File: timecore.cpp Line: 40 what's wrong here? can anybody help me out? thanks