"The Office" almost had a spinoff that sounds very similar to one of TV's top shows: "Modern Family."

In a TV Guide story, producers revealed there were talks to spinoff Ed Helms' Andy Bernard in a take on PBS's "An American Family."

"We were going to do a mockumentary version of the Loud family, with Helms' Andy as the dad and Catherine Tate [who later joined 'The Office' as Nellie Bertram] as the mom, living in a cul-de-sac somewhere in America. But in the intervening year, 'Modern Family' came out," Greg Daniels said. "And they did it."

Other "Office" spinoff ideas included a Jim (John Krasinski) and Pam (Jenna Fischer) family show, Craig Robinson getting his own show as Darryl and Dwight (Rainn Wilson) on his beet farm. "The problem was you didn't want to do anything that hurt the mother ship," former executive producer Michael Schur told TV Guide. "In Season 4 you couldn't take Jim and Pam from 'The Office.'"

"The Office" eventually produced the Dwight spinoff, "The Farm," which aired as an episode of "The Office," but NBC passed on it. Wilson told HuffPost TV that NBC passing on "The Farm" was "very disappointing." "We had worked really hard on it and I think created a really cool and different pilot," he said. "But it was kind of a relief in a way, because it's time to hang up the old Dwight bad haircut and glasses and move on."

After "The Office" wrapped, Wilson posted a photo of the sign-in sheet for the first day of casting, which included names like Adam Scott, Alan Tudyk and Mary Lynn Rajskub. And Daniels revealed to TV Guide that "Modern Family" star Eric Stonestreet was almost cast as Kevin, which went to Brian Baumgartner.

"Jenna [Fischer] was the perfect Pam," Daniels told TV Guide. "The only alternative to Jenna: I had a version in mind in which Pam was African American and so was [her boyfriend] Roy. It would have been Craig Robinson as Roy and Erica Vittina Phillips as Pam. I was flirting with that as part of Americanizing it."

Click over to TV Guide for more "Office" factoids.

For just two more weeks, "The Office" airs Thursdays at 9 p.m. ET on NBC.

Loading Slideshow...
  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "Finale"

    Scene from "The Office" series finale.

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • "The Farm"

    "The Farm"

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • 'The Office' Season 9

  • The Office Season 9

    Creed Bratton as Creed Bratton.

  • The Office Season 9

    Rainn Wilson as Dwight Schrute, John Krasinski as Jim Halpert.

  • The Office Season 9

    Clark Duke as Clark.

  • The Office Season 9

    Back row (l-r) Leslie David Baker as Stanley Hudson, Craig Robinson as Darryl Philbin, John Krasinski as Jim Halpert, Catherine Tate as Nellie Bertram, Creed Bratton as Creed Bratton, Middle row (l-r) Clark Duke as Clark, Jake Lacy as Pete, Angela Kinsey as Angela Martin, Ellie Kemper as Erin Hannon, Brian Baumgartner as Kevin Malone, Front row (l-r) Oscar Nunez as Oscar Martinez, Ed Helms as Andy Bernard, Kate Flannery as Meredith Palmer, Phyllis Smith as Phyllis Vance, Rainn Wilson as Dwight Schrute.

  • 'The Office' Season 9

  • The Office Season 9

    Rainn WIlson as Dwight Schrute and Clark Duke as Clark.

  • The Office Season 9

    Rainn Wilson as Dwight Schrute, Jenn Fischer as Pam Beesly Halpert, John Krsinski as Jim Halpert.

  • The Office Season 9

    Jenna Fischer as Pam Beesly Halpert.

  • The Office Season 9

    Rainn Wilson as Dwight Schrute.

  • The Office Season 9

    Jenna Fischer as Pam Beesly Halpert, John Krasinski as Jim Halpert.

  • The Office Season 9

    John Krasinski as Jim Halpert, Rainn WIlson as Dwight Schrute.