Can anyone suggest me an approach to retrieve the excel file details (Alternative of Interop)?  I want to track user working excel file details (like workbook name, sheet name, formula present in the sheet/workbook, Macro value.)
Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step.
It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you. Single question thread with multiple questions, some duplicates I've recently run into many questions where to author asks several related questions in one post, many of them asked before.   I'm wondering what out policy is on such questions:   Should I vote-close them as being not constructive? Should I vote-close them as duplicates? Should I leave them be? Or even suggest an answer?    - Each of the questions: Waiting for an AJAX request with selenium, and headless browsing in selenium have been asked here before, but he asked both in one.  I've done my best to search for similar questions here in meta but I was unable to find any, reading appreciated. Does my enemy get to make a saving throw for half damage for absolutely any spell I cast? So me and a group of friends recently started to play D&amp;D. I became a sorcerer. My question is: can the enemy I am attacking, no matter what spell I use, make a saving throw for half damage or does that only apply for certain spells?  For example, when I use my cantrip fire bolt, does the targeted opponent get to roll a saving throw for half damage against the spell, even though the description doesn't say anything about saving throws? C# Unsafe/Fixed Code Set "this" variable easily? I have a pretty good understanding of Javascript, except that I can't figure out a nice way to set the "this" variable.  Consider:  var myFunction = function(){     alert(this.foo_variable); }  var someObj = document.body; //using body as example object someObj.foo_variable = "hi"; //set foo_variable so it alerts  var old_fn = someObj.fn;   //store old value someObj.fn = myFunction;   //bind to someObj so "this" keyword works someObj.fn();               someObj.fn = old_fn;       //restore old value   Is there a way to do this without the last 4 lines?  It's rather annoying...  I've tried   binding an anonymous function, which I thought was beautiful and clever, but to no avail:  var myFunction = function(){     alert(this.foo_variable); }  var someObj = document.body;        //using body as example object someObj.foo_variable = "hi";        //set foo_variable so it alerts someObj.(function(){ fn(); })();    //fail.   Obviously, passing the variable into myFunction is an option... but that's not the point of this question.  Thanks. An "urgent" tag for questions that need answers within minutes Concatenating numbers and adding in leading zeros? I have three text fields populated as follows: 1, 9, 1 that I need to concatenate into a field that looks like 01.09.01.  Getting to 1.9.1 is easy but can anyone help out with how to formulate it so that each value has two places (i.e. add in those zeroes).  I used to do this in Excel but can't figure out how to work in ArcMap 10. How to read a file line-by-line into a list? Embedded Prolog Interpreter/Compiler for Java What is the meaning of the density of a distribution at a point? I know how to use PDFs to calculate probabilities, but I don't think I understand them. For example, at $X=0$ the PDF of the standard normal distribution is $\approx 0.4$. Does this have any useful meaning? How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string? When I entered the -al attribute with the  command, I got the following:  anupam@JAZZ:~/blog$ ls -al total 76 drwxrwxr-x 13 anupam anupam 4096 Aug 28 21:45 . drwxr-xr-x 34 anupam anupam 4096 Aug 28 20:52 .. drwxrwxr-x  8 anupam anupam 4096 Aug 28 12:19 app drwxr-xr-x  2 anupam anupam 4096 Aug 28 12:19 bin drwxrwxr-x  5 anupam anupam 4096 Aug 28 12:19 config -rw-rw-r--  1 anupam anupam  154 Aug 28 12:19 config.ru drwxrwxr-x  3 anupam anupam 4096 Aug 28 12:37 db -rw-rw-r--  1 anupam anupam 1339 Aug 28 12:19 Gemfile -rw-rw-r--  1 anupam anupam 2871 Aug 28 12:19 Gemfile.lock drwxrwxr-x  7 anupam anupam 4096 Aug 28 21:45 .git -rw-rw-r--  1 anupam anupam  466 Aug 28 12:19 .gitignore drwxrwxr-x  4 anupam anupam 4096 Aug 28 12:19 lib drwxrwxr-x  2 anupam anupam 4096 Aug 28 12:29 log drwxrwxr-x  2 anupam anupam 4096 Aug 28 12:19 public -rw-rw-r--  1 anupam anupam  249 Aug 28 12:19 Rakefile -rw-rw-r--  1 anupam anupam  478 Aug 28 12:19 README.rdoc drwxrwxr-x  8 anupam anupam 4096 Aug 28 12:19 test drwxrwxr-x  6 anupam anupam 4096 Aug 28 12:33 tmp drwxrwxr-x  3 anupam anupam 4096 Aug 28 12:19 vendor   What does each column mean, and what does the total 76 signify here? Addition with NULL values Why does the question's closed status disappear when clicking to load a new edit? I've come across a small issue which occurs when a question has been closed but the question itself or one of its answers are being edited.  Steps to reproduce:   Visit a closed question. (even closed years ago)   In a different tab or browser, edit the question or one of its answers. "an edit has been made to this post; click to load" message will appear above the edited post in the first tab/browser, click it. The .question-status div becomes hidden, which includes the closed notice below a question and, for a duplicate-closed question, the list of duplicates above the question body. This gives the appearance that the question is no longer closed (until you refresh).   Some screenshots:                I know it isn't common/important but it did confuse me when looking at a particularly bad question - I thought it had been reopened.   Is this an intentional feature? If so, what was the thinking behind it?    Another example  Before    After I have an application which is a relatively old. Through some minor changes, it builds nearly perfectly with Visual C++ 2008. One thing that I've noticed is that my "debug console" isn't quite working right. Basically in the past, I've use AllocConsole() to create a console for my debug output to go to. Then I would use freopen to redirect stdout to it. This worked perfectly with both C and C++ style IO.  Now, it seems that it will only work with C style IO. What is the proper way to redirect things like cout to a console allocated with AllocConsole()?  Here's the code which used to work:  if(AllocConsole()) {     freopen("CONOUT$", "wt", stdout);     SetConsoleTitle("Debug Console");     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED); }   EDIT: one thing which occurred to me is that I could make a custom streambuf whose overflow method writes using C style IO and replace std::cout's default stream buffer with it. But that seems like a cop-out. Is there a proper way to do this in 2008? Or is this perhaps something that MS overlooked?  EDIT2: OK, so I've made an implementaiton of the idea I spelled out above. Basically it looks like this:  class outbuf : public std::streambuf { public:     outbuf() {         setp(0, 0);     }      virtual int_type overflow(int_type c = traits_type::eof()) {         return fputc(c, stdout) == EOF ? traits_type::eof() : c;     } };  int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {     // create the console     if(AllocConsole()) {         freopen("CONOUT$", "w", stdout);         SetConsoleTitle("Debug Console");         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);       }      // set std::cout to use my custom streambuf     outbuf ob;     std::streambuf *sb = std::cout.rdbuf(&amp;ob);      // do some work here      // make sure to restore the original so we don't get a crash on close!     std::cout.rdbuf(sb);     return 0; }   Anyone have a better/cleaner solution than just forcing std::cout to be a glorified fputc? Proving that the set of $\nu$ measurable sets $M\subseteq P(X)$ is an algebra How can I handle the warning of file_get_contents() function in PHP? How to display Trash and Home folder icons? Group presentation for discrete Heisenberg group Variable Sized Arrays vs calloc in C On the discussion of dynamic memory here:   The author states:     A memory block like this can effectively be used as a more flexible array. This approach is actually much more common in real-world C programs. It's also more predictable and flexible than a "variable size array"   The type of memory block he is talking about is as such:  const int size = 5; int * array = calloc(size, sizeof(int));   and then using another pointer to iterate over the array:  int * index = array; for (i = 0; i &lt; size; i++) {     *index = 1; // or whatever value     index++; }   My question is how is this method better than a standard variable sized array like this?:  int array[variable];   or dynamic:  char name[] = "Nick";   The author doesn't really shed much light as to why I should prefer the former method to the latter. Or more specifically: How is it more "predictable and flexible"?