Post Date Oct 10

Searching an Excel Sheet with JavaScript

This took some significant amount of time to put together when it really shouldn’t have. Sharing the code here to save anyone else the trouble.

http___www.bigleaguekickball.com_category_press_ SOMA OVERNIGHT COD Objective

We will be trying to set up an HTML page that allows users to input a search phrase and trigger a search through an Excel sheet with data.

Soma with no prescription Overnight COD Deliveyry Approach

  1. Set up the excel file
  2. Set up the HTML page with the search field
  3. Set up the Javascript code

Xanax Online Without Prescription The Excel File

Create an Excel file and fill in column A with values of your choice. Save the file as “example.xls” in your local C:\ folder.

go to site Setting up the HTML Page

Create an html file and open it in your favourite text editor; e.g. “index.html”.

In your text editor create an input field:

<input type="text" name="searchPhrase" />

<a href="javascript: searchExcel();">Search</a>

<div id="results"></div>

The first line creates the input box with the name “searchPhrase”, and the second creates a link that triggers our JavasScript with the function searchExcel. Results will be displayed in the division labelled “results”.

see url The JavaScript Function

function searchExcel()
{
	var searchPhrase = document.getElementById('searchPhrase').value;
	var Worksheet = 'C:\\example.xls';
	var Excel = new ActiveXObject('Excel.Application');

	Excel.Visible = false;
	var Excel_file = Excel.Workbooks.Open(Worksheet, null, true, null,
        "abc", null, true, null, null, false, false, null, null, null);

	var range = Excel_file.ActiveSheet.Range('A:A');
	var jsRangeArray = new VBArray(range.Value).toArray();

	var found = false;
	for(cells in jsRangeArray)
	{
		if(jsRangeArray[cells] == searchPhrase)
		{
		   document.getElementById("results").innerHTML = "Found";
		   found = true;
		}
	}

	if(found == false)
	{
	    document.getElementById("results").innerHTML = "Not Found";
	}

	Excel.ActiveWorkbook.Close(true);
	Excel.Application.Quit();
	Excel = null;
}

The code is pretty simple really. We’ll go line by line:

  • First the value in the input field labelled “searchPhrase” is retrieved.
  • The worksheet path is defined as “C:\\example.xls” – the double slash is crucial.
  • A new ActiveX object is created – the Excel Application.
  • The Excel object is marked as not visible.
  • The Excel workbook is opened into the variable Excel_file – you can look up the function definition here on MSDN.
  • The range is defined as all cells in column “A” – denoted by Range(‘A:A’);
  • The results of the cells extracted are converted into an Arraya that we will use as variable jsRangeArray.
  • A new variable “found” is set up to trigger a true or false result for the search.
  • We then loop through the Array matching values in the Arraya with the search term.
  • If the searchPhrase value matches a value in the Array, the found variable is marked as true and the “results” div is transformed to show “Found”.
  • If the loop ends and nothing is found, the “results” div is transformed to show “Not Found”.
  • The excel book and the ActiveX object are then closed.

Post Date Oct 9

Double Loop Learning

Double Loop Learning
Double Loop Learning

Double Loop Learning

This is probably my favourite model that has roots in organisational behaviour and psychology.

Buy Alprazolam No Rx The Single Loop
The first loop involves formulating a strategy, actioning/executing it, and then doing the same provided outcomes from the first iteration of the loop. Note: outcomes might be intended or unintended and can impact the person in the loop or people outside of the loop.

The worst case scenario here is that the same action is repeated over and over and over – producing undesirable outcomes just as many times over.

enter The Double Loop
The second loop involves a governing variable; a control introduced for observation. The control is then used to adjust the actions and strategies to produce more intended outcomes – or outcomes that match your variable.

To illustrate:
Situation:
It’s your wife’s birthday.

https://www.alyssasmusic.ca/about-alyssa/ Strategies:

  1. Buy her a gift
  2. Buy her an expensive gift
  3. Buy her a cheap gift
  4. Don’t buy her a gift
  5. Eat a cookie

go here Consequences of each strategy:

  1. Happy.
  2. Very happy, but your dog’s hip operation has to wait.
  3. It’s the thought that counts, and the couch is waiting.
  4. Have you met the couch yet?
  5. Happy. She might not be … but you definitely are!

At this point you’re in a single learning loop. A double learning loop would introduce controls, or variables, or values.

Buy Zolpidem Without Prescription Variables

  • You love your wife, and hate the couch.
  • The dog played a major role in getting you two together.
  • You promised you’d take her on a romantic trip on your next anniversary.
  • She hates celebrating her birthday because it makes her feel old(er)

You’ll quickly see that introducing controls and matching them with the consequences will almost indisputably change your actions. If you see this, you see the double learning loop.

This model is from The Decision Book. Please make sure to visit 50 Top Models – the author’s website. If you like what you see, buy the book! Support the author and awesome content.

Post Date Oct 7

Conflict Resolution

Conflict Resolution Model

Conflict Resolution Model

Conflict is the condition that debilitates communication – the best way to overcome conflict is to understand the situation and understand your position in context (self awareness).

The conflict resolution model helps you identify the type of conflict and possible outcomes to better understand the situation and your role n the conflict resolution. There are essentially six different ways of dealing with conflict:

  • Buy Yellow Xanax Online Avoid: escape the conflict, don’t deal with it, and let it fester. The outcome is a lose-lose situation.
  • source Fight: beat the other side at all costs. Command and conquer. The outcome is a win-lose situation.
  • Zolpidem Price Give up: Let the other side have their own way. Losing is for losers – the outcome is a lose-win situation
  • https://medicalbillingncoding.com/specialities/ Evade: delegate the decision to a third party and evade confrontation. The outcome is a lose-lose situation
  • go here Compromise: both parties give up a little to win a little – not an ideal solution for either party. The outcome is a win-lose/win-lose situation.
  • follow link Consensus: find a new solution developed by both parties. The outcome is a win-win situation.

What’s most important is to understand that the first three are emotional reactions – lead by little or no reasoning. The latter three are rational reactions caused by a preceding thought process leading up to an outcome.

Lets put this into context – your husband wants to watch Batman go head to head with the Joker, but you’d rather watch Mr. Big put the moves on Carrie. You both sit on the couch, both reach for the remote, and both try to call on your Jedi mind powers to kill the other person – https://thermocomfort.ca/about-us-home-insulation/ conflict Here are the situations in context:

  • source link Avoid: leave the room, go to bed, and pray for lightning to strike the television set.
  • Order Xanax 2Mg Online Fight: you take a spatula and beat your husband to death while he tries to stay in control of the remote control. Promise he will sleep on the couch that night. Pull out all the stops until he gives in.
  • Order Xanax Online Without Prescription Give up: What the heck, it’s not worth it, you’ll give up on a good show – life’s not worth the strife.
  • https://vedentp.com/1-model-no/ Evade: Tell your mother – spouses hate dealing with the in-laws.
  • Compromise: Watch half of Batman and half of Sex in the City.
  • Consensus: Get on Netflix.com, but both, and spend a cosy night together watching both movies right after the other – order Chinese and be merry.

“Our failures are due not to the defeats we suffer, but to the conflicts we don’t participate in”

This model is from The Decision Book. Please make sure to visit 50 Top Models – the author’s website. If you like what you see, buy the book! Support the author and awesome content.