![]() This will make a link between the file and the XLSTAT project where the code is stored. Then you need to run first the macro called "RunMeOnce". Go to the menu Run / Run Macro located in the menu bar. The next step is to copy and paste the code contained in the Notepad file into this module.Īt this step you can add more codes to enable the programme to perform other actions. Then select Sheet1 in the folder VBAProject(Automation_2.xls) and finally right click and opt for the action Insert / Module. Now open the second file Automation_2.xls Press Alt+F11 together in order to launch the Visual Basic Application. You can see that all the samples are centered tidily around the middle of the plot. This process is usually stable so we can expect little variation. Once you have completed this click again on Select and then press Done. Now choose the plot for the axes F1 and F2 by clicking Select, then change the selection to Abscissa F3 and Ordinates F4. Save the code under a name that is easy for you to remember, for example in this case we use "VBA-PCA-recipe1". Once you have pressed the button a Notepad document will appear containing the VBA code. Generate the VBA code to be reusedĬlick on the grey button at the bottom left of the dialog box: Click this button to generate the VBA code that will allow you to run the dialog box from your code. Now we have specified all the setting we will save the code to be reused. Here we want to get a synthetic report so we will only select the following:įinally we are going to use all three plots that can be selected in the Charts tab: This way all the components will be calculated. For the option Filter factors, choose Maximum number and set the value to six. Sheet: chosen to display the results in a new sheet Observation labels: ticked and select the column A for the sample name Observations/variables table: Columns B to Gĭata format: Observations/variables table Select the XLSTAT / Analyzing data / Principal components analysis command. Generating the code to automate a routine analysis The next step of the automation procedure is to set up your statistical analysis. Go to the menu Options and in the tab Advanced enable the option Show the advanced buttons in the dialog boxes. We are going to create a Principal component analysis template on one dataset and use it on the second. The data used is the process measurements of food samples. Dataset for automating a routine analysis ![]() This tutorial shows how to automate a routine analysis in Excel using the XLSTAT software.
0 Comments
Leave a Reply. |